I am stuck on topic 1 'Navigation', part 4 of command line


#1

I can do the first part of the exercise but when it gets to part 2; 'List all files and directories in the working directory' I don't know what to do after this. I was wondering if anyone could please provide me with some useful information on how to do it? I would very much appreciate it.


#2

If you want to list all files and directories in the directory you are in, you would use the "ls" command.


#3

@dannycillumini,

$ # look at your current/working directory (where am i )
$ pwd

/home/ccuser/workspace/blog

$# list files with ls
$# -a is-a-qualifier for:: show ALL files
$# -l  is-a-qualifier for:: in LONG-FORMAT
$# -s is-a-qualifier for:: show SIZE
$ ls -als

total 24

4 drwxr-xr-x 4 ccuser ccuser 4096 Mar 23 23:06
4 drwxr-xr-x 3 ccuser ccuser 4096 Mar 23 23:06
8 -rw-r--r-- 1 ccuser ccuser 6148 Jun 11  2015 .DS_Store
4 drwxr-xr-x 3 ccuser ccuser 4096 Jun  9  2015 2014
4 drwxr-xr-x 4 ccuser ccuser 4096 Jun  9  2015 2015
0 -rw-r--r-- 1 ccuser ccuser    0 Jun  9  2015 hardware.txt

$#looking at drwxr-xr-x
$#you see it is a "d"irectory
$#change into the directory 2015

$ cd 2015

$#look if you are now in the 2015 directory
$ pwd

/home/ccuser/workspace/blog/2015