Question: COMMAND LINE / BASIC BASH QUESTIONS The questions below give relative pathnames. They are relative to the current working directory after all the commands have

COMMAND LINE / BASIC BASH QUESTIONS

The questions below give relative pathnames. They are relative to the current working directory after all the commands have been executed.

how many .txt files in the current working directory?

is it possible that a file a/bar.txt exists?

does file foo.txt exist?

does file a/a/bar.txt exist?

what is the content of file a/foo.txt?

was file a/foo.txt created during the execution of the commands?

what is the content of file a/a/foo.txt?

was file a/a/foo.txt created during the execution of the commands?

what is the content of the file a/a/a/bar.txt?

was file a/a/a/bar.txt created during the execution of the commands?

$ ls

week2-test

$ cd week2-test

$ ls

a foo.txt

$ ls .

a foo.txt

$ cd a

$ ls ..

a foo.txt

$ cd a

$ ls

a foo.txt

$ cat foo.txt

stuff

$ cat ../../foo.txt

some stuff

$ cd a

$ ls

$ cp ../foo.txt bar.txt

$ cp bar.txt ../../foo.txt

$ cd ../../..

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!