The-Unix-Shell-Teaching-Notes

2.5 ls Reading Comprehension

If pwd displays /Users/backup, and -r tells ls to display things in reverse order, what command(s) will result in the following output:

pnas_sub/ pnas_final/ original/

File System for Challenge Questions

  1. ls pwd

  2. ls -r -F

  3. ls -r -F /Users/backup

Solution 1. No: `pwd` is not the name of a directory.
2. Yes: `ls` without directory argument lists files and directories in the current directory.
3. Yes: uses the absolute path explicitly.

Episode 3 Exercise 1