Skip to Content
avatar image
Former Member

Not able to understand the output of ls -sin

HI all,

When i try to access the output ls -isn .I am not able to understand the output .Can anybody help me understand the output.

ls -isn

total 25969

255223 4 -rw-rr 1 6251 201 1303 Apr 8 20:54 dev_rout

255885 3 -rw-rr 1 6251 201 842 Apr 8 20:55 dev_sapstart

254485 2 lrwxrwxrwx 1 6251 201 57 Jan 13 02:47 Download_Manager -> /export/home/hlgadm/SAP_Download_Manager/Download_Manager

260129 4 -rw-rr 1 6251 201 1298 Feb 24 20:40 HLG_J2EE.txt

255880 2 -rw-rr 1 6251 201 129 Apr 8 20:54 JdbcCon.log

254775 2 -rw-rr 1 6251 201 136 Nov 28 05:37 local.cshrc

254776 2 -rw-rr 1 6251 201 157 Nov 28 05:37 local.login

254777 2 -rw-rr 1 6251 201 174 Nov 28 05:37 local.profile

258573 25879 -rw-rr 1 6251 201 13205668 Mar 1 22:27 Rules.txt

254877 3 drwxr-xr-x 3 6251 201 3 Dec 3 02:24 SAP

254209 2 -rw-r----- 1 6251 201 477 Nov 28 21:37 sdtstart.err

254469 8 -rw-rr 1 6251 201 3278 Mar 13 02:31 startdb.log

254468 23 -rw-rr 1 6251 201 11058 Apr 8 20:54 startsap_.log

254487 6 -rw-rr 1 6251 201 1821 Apr 8 20:55 startsap_JC00.log

254470 6 -rw-rr 1 6251 201 1692 Apr 8 20:55 startsap_SCS01.log

255635 5 -rw-rr 1 6251 201 1760 Mar 13 02:30 stopdb.log

255631 8 -rw-rr 1 6251 201 3104 Apr 8 20:52 stopsap_.log

255632 2 -rw-rr 1 6251 201 288 Apr 8 20:52 stopsap_JC00.log

255634 2 -rw-rr 1 6251 201 290 Apr 8 20:52 stopsap_SCS01.log

257564 4 -rw-rr 1 6251 201 1482 Dec 23 11:46 trans.log

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 10, 2009 at 07:51 AM

    Hello Ambarish,

    it is documented in the man page:

    http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.cmds/doc/aixcmds3/ls.htm

    -i Displays the i-node number in the first column of the report for each file.

    -s Gives size in kilobytes (including indirect blocks) for each entry.

    -n Displays the same information as the -l flag, except that the -n flag displays the user and the group IDs instead of the user and group names.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 10, 2009 at 08:46 AM

    Hi Ambarish

    Try to understand the output by comparing the ouput of ls -l and with individual flag outputs:

    like if we take an example of ls -l

    inbhsha@r3lpar15(/oracle)$ ls -l

    total 40

    drwxrwxr-x 24 orai36 dba 4096 Apr 08 10:28 I36

    drwx S - 3 root dba 256 Jan 25 13:31 P10

    drwxrwxr-x 33 oras10 dba 4096 Feb 15 08:17 S10

    drwxr-s--- 3 orai36 dba 256 Jun 24 2008 admin

    drwxr-sr-x 5 orai36 dba 256 Jun 17 2008 client

    drwxrwxr-x 2 orai36 dba 256 Jul 05 2006 lost+found

    drwxrws--- 7 orai36 dba 4096 Feb 15 05:46 oraInventory

    drwxrws--- 7 orai36 dba 4096 Jan 18 13:59 oraInventory.10204Jan18

    drwxrws--- 5 orai36 dba 256 Jun 18 2008 oraInventory.18JUN

    drwxrwxrwx 13 orai36 dba 4096 Jun 18 2008 oraInventory.920_64.Jun08

    drwxr-s--- 3 orai36 dba 256 Jun 24 2008 oradata

    drwxrwxr-x 5 orai36 dba 256 Feb 10 14:14 stage

    inbhsha@r3lpar15(/oracle)$ pwd

    /oracle

    man page shows help for ls -ls as below:

    -l

    (Lower case L) Displays the mode, number of links, owner, group,

    size (in bytes), and time of last modification for each file. If

    the file is a special file, the size field contains the major and

    minor device numbers. If the time of last modification is greater

    than six months ago, the time field is shown in the format month

    date year where as files modified within six months the time field

    is shown as month date time format.

    Similarily for ls -i :

    inbhsha@r3lpar15(/oracle)$ ls -i

    32 I36

    627582 P10

    627567 S10

    223033 admin

    106628 client

    188508 lost+found

    222930 oraInventory

    618560 oraInventory.10204Jan18

    221184 oraInventory.18JUN

    221191 oraInventory.920_64.Jun08

    223031 oradata

    307200 stage

    inbhsha@r3lpar15(/oracle)$

    as shown above, it shows only the inode numbers for specific files or directories listed

    man help for ls -i:

    -i

    Displays the i-node number in the first column of the report for

    each file.

    For ls -s

    inbhsha@r3lpar15(/oracle)$ ls -s

    total 20 4 oraInventory

    4 I36 4 oraInventory.10204Jan18

    0 P10 0 oraInventory.18JUN

    4 S10 4 oraInventory.920_64.Jun08

    0 admin 0 oradata

    0 client 0 stage

    0 lost+found

    inbhsha@r3lpar15(/oracle)$

    As shown above, now listing is not sorted as in ls -l command, but listed filenames are shown only with filesize specified with number of K blocks

    man help for ls -s

    -s

    Gives size in kilobytes (including indirect blocks) for each

    entry.

    For ls -n

    inbhsha@r3lpar15(/oracle)$ ls -n

    total 40

    drwxrwxr-x 24 216 207 4096 Apr 08 10:28 I36

    drwx S - 3 0 207 256 Jan 25 13:31 P10

    drwxrwxr-x 33 310 207 4096 Feb 15 08:17 S10

    drwxr-s--- 3 216 207 256 Jun 24 2008 admin

    drwxr-sr-x 5 216 207 256 Jun 17 2008 client

    drwxrwxr-x 2 216 207 256 Jul 05 2006 lost+found

    drwxrws--- 7 216 207 4096 Feb 15 05:46 oraInventory

    drwxrws--- 7 216 207 4096 Jan 18 13:59 oraInventory.10204Jan18

    drwxrws--- 5 216 207 256 Jun 18 2008 oraInventory.18JUN

    drwxrwxrwx 13 216 207 4096 Jun 18 2008 oraInventory.920_64.Jun08

    drwxr-s--- 3 216 207 256 Jun 24 2008 oradata

    drwxrwxr-x 5 216 207 256 Feb 10 14:14 stage

    inbhsha@r3lpar15(/oracle)$

    As shown above, now the owner or userid and groupid are shown in numerics instead of orai36 and dba as those were there in ls -l

    man help for ls -n

    -n

    Displays the same information as the -l flag, except that the -n

    flag displays the user and the group IDs instead of the user and

    group names

    Hence, in your command output:

    first column: inode number

    2nd: no. of links

    3rd: mode or permissions

    4th: user or owner id in numeric

    5th: groupid in numeric

    6th: size

    7th: datetime

    8th:file/directory name

    thanks

    Bhudev

    Add comment
    10|10000 characters needed characters exceeded