Saturday, April 4, 2009

LS command

ls /var/www/html/*.html = lists all html files
ls .??* = lists all directory names that start with a dot .
ls /etc/rc.d = prints all directories for all available run levels
ls /etc/rc.d/init.d = list of system services' scripts
ls -l = lists files and folders in the current directory
ls -la = lists files and folders in the current directory with a dot
ls li = files with their inodes
ls -lt = files recently modified
ls -lu = lists files by their accss time
ls -ln = user names and groups numerically displayed
ls -lh = human readable file sizes
ls -lR = displays all the files and their folders
ls -F = lists files by type
ls -c = lists files columnwise
ls –color =always = shows filenames in colors

ls -l /var/lib/rpm = rpm database
ls = lists contents of a directory
ls . = lists contents of a directory
ls .. = lists contents of a directory
ls / = lists all system directories
ls = lists directories in current directory
ls /var = lists all subdirectories under the /var directory
ls /proc | wc -l = number of subdirectories in /proc directory
ls -ltr =
ls -l filename.ext = checks permissions for a file
ls -l /etc = permission status of all subdirectories
ls -a = shows hidden . Dot directories. A kind of special configuration files not be messed with

2 comments:

  1. hi..Im college student, this article is very informative, thanks for sharing :)

    ReplyDelete
  2. Australian Leather Handbags A leading name in the leather industry, Aussie Bush Leather is now offering one of the unique leather travel goods, The Traveller. It is an exceptional travel bag that fits every style and perfect for long trips. This leather travel bag costs $469 and is available with them in multiple colors like tan, dark brown and burgundy.For more information, please visit: http://aussiebushleather.com.au/

    ReplyDelete