ls command

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.

Syntax

The syntax for the ls command is:
ls [options] [names]

Options

OptionDescription
-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.

Comments

Popular posts from this blog

gsutil Vs Storage Transfer Service Vs Transfer Appliance

SQL basic interview question