Manipulation 3/10


#1

Let’s try out another option for the ls command.
Navigate to the comedy/ directory

none of the options for the $ ls such as
1 .-a - lists all contents, including hidden files and directories
2. -l - lists all contents of a directory in long format
3. -t - order files and directories by the time they were last modified.
are working for me ?


#2

You will have to use
ls -a
or
ls -l # which the lowercase L
or
ls -t
or all-three-at-once
ls -alt


#3

ight leon I tried it but I got
In the instructions its asking me
"Let’s try out another option for the ls command.

Navigate to the comedy/ directory."

do they mean that I should use the “cd” to change directory to the comedy

with the ls or something ?


#4

I did and none of it worked. for some reason


#5

If you want to navigate in a file-System ( the directory structure )
you will have to inspect this directory-structure

with
pwd you will see your current-directory
with
ls -als you will see all file’s, in the long-format inclusive the socket
For a understanding of the total-line per file in your current-directory,
https://unix.stackexchange.com/questions/103114/what-do-the-fields-in-ls-al-output-mean

I will show an example

4 drwxr-xr-x 3 ccuser ccuser 4096 Jul  7  2015 .                                                      
4 drwxr-xr-x 5 ccuser ccuser 4096 Feb  6 23:28 ..                                                     
0 -rw-r--r-- 1 ccuser ccuser    0 Jun 30  2015 .gitignore                                             
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul  7  2015 satire                                                 
0 -rw-r--r-- 1 ccuser ccuser    0 Feb  6 23:29 shrek.txt                                              
4 -rw-r--r-- 1 ccuser ccuser   14 Jun 29  2015 the-office.txt

I see 3 directories

drwxr-xr-x 3 ccuser ccuser 4096 Jul  7  2015 .
drwxr-xr-x 5 ccuser ccuser 4096 Feb  6 23:28 ..                                           
drwxr-xr-x 2 ccuser ccuser 4096 Jul  7  2015 satire

and
2 normal =empty= files

-rw-r--r-- 1 ccuser ccuser    0 Jun 30  2015 .gitignore                                             
-rw-r--r-- 1 ccuser ccuser    0 Feb  6 23:29 shrek.txt

with a
ls -als ..
i can look at what i have in the parent-directory
and with a
ls -als satire/
i can look at all the files of the child

Now you can decide to where you want to have your working directory
If you want to change into the parent-directory you will use
cd ..
If you want to change in to the child-directory you would use
cd satire/

Now you
determine where you are pwd
look at what you have ls -als
change UP with cd ..
change down-wards cd dirName/
( AFTER a cd Always do a pwd to check if you are actually where you think you would be )

Stuck on Manipulation 6.cp ll


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.