Improve answer to Exploring More ls Arguments #477

Open
rgaiacs opened this Issue Nov 7, 2016 · 1 comment

Projects

None yet

2 participants

@rgaiacs
Collaborator
rgaiacs commented Nov 7, 2016

Question:

What does the command ls do when used with the -l and -h arguments?

Current Solution:

The -l arguments makes ls use a long listing format, showing not only the file/directory names but also additional information such as the file size and the time of its last modification. The -h argument makes the file size “human readable”, i.e. display something like 5.3K instead of 5369.

Suggest Solution:

For -l we will have something like

drwxr-xr-x 2 raniere raniere  4096 Oct 12 14:41 creatures/
drwxr-xr-x 4 raniere raniere  4096 Oct 12 14:41 data/
drwxr-xr-x 2 raniere raniere  4096 Oct 12 14:41 Desktop/
drwxr-xr-x 2 raniere raniere  4096 Oct 12 14:41 molecules/
drwxr-xr-x 3 raniere raniere  4096 Oct 12 14:41 north-pacific-gyre/
-rw-r--r-- 1 raniere raniere    86 Oct 12 14:41 notes.txt
-rw-r--r-- 1 raniere raniere    32 Oct 12 14:41 pizza.cfg
-rw-r--r-- 1 raniere raniere 21583 Oct 12 14:41 solar.pdf
drwxr-xr-x 6 raniere raniere  4096 Oct 12 14:41 writing/

The first 10 characters represent permission. d means ... The first number is ... The first name is the group owner of the file and the second name is the user owner of the file. ...

@shwina
Member
shwina commented Dec 23, 2016

@rgaiacs What do you think about removing -l entirely from the lesson?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment