DistributedNetworks DistributedNetworks

File Management «Prev 

Using options with ls in Unix

dir dir [options] [file]
List directory contents. dir is equivalent to the command
ls -C -b 
(list files in columns, sorted vertically, special characters escaped) and it takes the same arguments as ls. This is an alternate invocation of the ls command and is provided for the convenience of those converting from Microsoft Windows and the DOS shell.

The ls-F command marks directories with a trailing slash (/)

When you add the -a option, ls lists hidden files.

Use the -R option to produce a recursive listing (a directory tree). To start from your current directoy, do not supply a directory name.

Suppose you want to check permissions on the images directory. This command does the wrong thing. It lists the contents of the directory instead of the directory itself.

To list the right information, add the -d option to show only the directory name.