Sunday, May 20, 2012

Setting alias for 'ls -l' command

I wish to enhance the default alias ('ll') for 'ls -l' command into more pleasing one:

Following is the alias options which I set for 'll' :   # alias ll='ls -lhGpt --color=always'
'-h' - Human readable
'G' - No Group information
'p' - Append / notation for folders
't' - Sort by modification time.

SAMPLE OUTPUT:

[ashok@hostxyz etc]$ ll
total 3.5M
-rw-r--r--  1 root 204K May 20 04:05 prelink.cache
-rw-r--r--  1 root  14K May 16 20:36 group
-r--------  1 root 7.6K May 16 20:36 gshadow
-rw-r--r--  1 root  43K May 16 20:36 passwd
-r--------  1 root  27K May 16 20:36 shadow
-rw-r--r--  1 root  14K May 16 20:33 group-
-r--------  1 root 7.6K May 16 20:33 gshadow-
-rw-r--r--  1 root  43K May 16 20:33 passwd-
-r--------  1 root  27K May 16 20:33 shadow-
drwxr-xr-x  2 root 4.0K May  9 05:16 ssh/
drwxr-xr-x  2 root 4.0K May  8 19:00 blkid/
drwxr-xr-x 10 root 4.0K May  8 06:11 sysconfig/
-rw-r--r--  1 root  128 May  7 03:55 resolv.conf
.
.
<Output truncated>

No comments:

Post a Comment

Popular Posts

About Me

My photo
I have started this blog to share my work experience and spread some smart solutions on Linux to Internet community. I'm hoping more people will get benefited from this blog. Brief about me: I have 14+ years experience working as System Admin and currently work with VMware.