dir instead of ls -al command

MD-253 & MD-500 Discussion
Post Reply
MartinX
Posts: 7
Joined: Mon Jan 30, 2012 7:58 pm

dir instead of ls -al command

Post by MartinX » Sun Feb 12, 2012 10:12 pm

Most of us are more familiar with good old dir command than ls -al. It is shorter al least... :mrgreen:

When you do the telnet to the box, type cd[space] (it will bring you back to users home folder), then do copy next few lines (in bold) and tadaaa...

/ # echo "alias dir='ls -al'" > .profile
/ # more .profile
alias dir='ls -al'
/ # . ./.profile
/ # dir
drwxr-xr-x 12 root root 1024 Feb 12 23:05 .
drwxr-xr-x 12 root root 1024 Feb 12 23:05 ..
-rw-r--r-- 1 root root 346 Feb 12 23:06 .ash_history
-rw-r--r-- 1 root root 19 Feb 12 23:05 .profile
lrwxrwxrwx 1 root root 7 Sep 17 03:59 bin -> usr/bin
drwxrwxrwx 7 root root 2048 Jan 1 1970 dev
drwxr-xr-x 10 root root 1024 Feb 12 18:59 etc
drwxr-xr-x 5 root root 61 Feb 10 12:41 home
lrwxrwxrwx 1 root root 7 Sep 17 03:59 lib -> usr/lib
lrwxrwxrwx 1 root root 11 Sep 17 03:59 linuxrc -> bin/busybox
drwxr-xr-x 2 root root 1024 Sep 24 19:53 mnt
dr-xr-xr-x 85 root root 0 Jan 1 1970 proc
drwxr-xr-x 2 root root 1024 Sep 24 19:53 root
lrwxrwxrwx 1 root root 7 Sep 17 03:59 sbin -> usr/bin
drwxr-xr-x 14 root root 0 Jan 1 1970 sys
drwxrwxrwt 11 root root 260 Feb 12 21:56 tmp
drwxr-xr-x 6 root root 78 Sep 24 19:53 usr
drwxr-xr-x 6 root root 1024 Feb 12 18:59 var
/ #

Post Reply