IT Questions and Answers :)

Wednesday, January 29, 2020

On a Linux system, what is the output of " ls -si /tmp "

On a Linux system, what is the output of " ls -si /tmp "

  • Human-readable sizes of names in /tmp using powers of 1000
  • Index (inode) number of each name in /tmp, the allocated size in blocks of each name, and the name
  • Human-readable size of names in /tmp using powers of 1024
  • Names in /tmp sorted by inode number 

On a Linux system, what is the output of " ls -si /tmp "

EXPLANATION

Most Linux utilities, including "ls", can be used with short options (prefixed with a single hyphen), or long options, (prefixed with two hyphens).  Some Linux utilities, like "tar" and "ps", do not require a prefix for short options.  Multiple short options may be combined following a single hyphen.
So the short option for size,  " -s ", may be combined with the short option for inode,  " -i ", as in 
ls -si  /tmp
Short options can be given in any order, but the order of the options does not affect the order of the output.
Long options (more than one character), are prefixed with two hyphens, as in
ls  --si  /tmp
The long option above, " --si ", is not the same as the combined short options, " -si ", and the long option, "--si",   will list the allocated block sizes of the names in /tmp in human-readable form using powers of 1000 (as opposed to 1024).

SOURCE

http://www.man7.org/linux/man-pages/man1/ls.1.html
Share:

0 comments:

Post a Comment

Popular Posts