coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ls enhancement


From: linuxCowboy
Subject: ls enhancement
Date: Wed, 14 Jan 2015 11:58:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120613 Icedove/3.0.11

Hello!

I was astonished that Linux dir/ls could not count files/dirs like DOS and implemented it myself month ago.

It's now indispensable for me and maybe useful for others too?

Example:

3997 0 /home/lxc $ \ls -l /usr
total 272
drwxrwxr-x   2 root root   73728 Jan 12 00:31 bin
drwxr-xr-x   2 root root    4096 Jan  4 22:35 games
drwxr-xr-x 110 root root   36864 Jan  4 21:55 include
drwxrwxr-x 271 root root  106496 Jan  6 00:05 lib
drwxr-xr-x   3 root root    4096 Dec 12  2011 lib64
drwxrwsr-x  13 root staff   4096 Oct 20 22:51 local
drwxr-xr-x   2 root root   20480 Jan 12 02:23 sbin
drwxrwxr-x 437 root root   16384 Jan 12 01:39 share
drwxr-xr-x   8 root root    4096 Aug 12  2013 src
  0 Files  0 Links  9 Dirs  -  270.336 (0) Bytes

3998 0 /home/lxc $ \ls -lR /usr|tail
-rw-rw-rw- 1 root root   285 May 21  1999 tile.cc
-rw-rw-rw- 1 root root  1372 Jan 10  2000 tile.hh
-rw-rw-rw- 1 root root  2482 Oct  5  2002 tileset.cc
-rw-rw-rw- 1 root root  1671 Jan 27  2003 tileset.hh
-rw-rw-rw- 1 root root  8771 Oct  5  2002 traverse.cc
-rw-rw-rw- 1 root root  1079 Jan 27  2003 traverse.hh
-rw-rw-rw- 1 root root  8438 Oct  5  2002 xmj3ts.cc
-rw-rw-rw- 1 root root  1136 Aug 29  2003 xmj3ts.hh
  45 Files  1 Link  0 Dirs  -  185.669 (185.631) Bytes
168.440 Files 29.257 Links 20.822 Dirs # 6.053.652.735 (5.962.597.158) Bytes

3999 0 /home/lxc $ ls --help
...
-J, --no-journal in a long listing, do not add up files and dirs
...


-J to switch it off
() is pure file size

It's easy, but I can supply my little dirty ls.diff for version 8.xx.

LxC



reply via email to

[Prev in Thread] Current Thread [Next in Thread]