Welcome to Data Warehousing Flying Bee

Tuesday 22 May 2012

Unix basic Commands




The ls command lists all files in the directory that match the name. If name is left blank, it will list all of the files in the directory.
The syntax for the ls command is:
ls [options] [names]

Options:

-aDisplays all files.
-bDisplays nonprinting characters in octal.
-cDisplays files by file timestamp.
-CDisplays files in a columnar format (default)
-dDisplays only directories.
-fInterprets each name as a directory, not a file.
-FFlags filenames.
-gDisplays the long format listing, but exclude the owner name.
-iDisplays the inode for each file.
-lDisplays the long format listing.
-LDisplays the file or directory referenced by a symbolic link.
-mDisplays the names as a comma-separated list.
-nDisplays the long format listing, with GID and UID numbers.
-oDisplays the long format listing, but excludes group name.
-pDisplays directories with /
-qDisplays all nonprinting characters as ?
-rDisplays files in reverse order.
-RDisplays subdirectories as well.
-tDisplays newest files first. (based on timestamp)
-uDisplays files by the file access time.
-xDisplays files as rows across the screen.
-1Displays each entry on a line.

Examples:

ls -la

* Please note that there are many flavors of UNIX, so if in doubt, consult your man pages.

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Justin Bieber, Gold Price in India
Flying Bee Fish swimming from right to left Bat flying really fast