Social Sciences, asked by bhaskarramya78, 3 days ago

list out the contents​

Answers

Answered by vrindawadhwa875
0

Answer:

please type full question not able to understand

Answered by tanishgupta886
0

Explanation:

Listing the contents of a directory

The names and other information about the files and subdirectories contained within a directory can be displayed using the ls(C) family of commands. In its simplest form, ls gives a list of the filenames found in the current working directory, as follows:

$ ls

cs-save

gav_make

glossary.s

graphics

intro.err

nohup.out

procs.txt

To see a list of the filenames in a multi-column format, use the lc variant, as follows:

$ lc

cs-save intro.err

gav_make nohup.out

glossary.s procs.txt

graphics

For a full listing, giving file size, permissions, owner and other items of information, use the ls -l option, as follows:

$ ls -l

drwx------ 2 chris techpubs 64 Jul 07 17:19 tools

drwxr-xr-x 2 chris techpubs 80 Jul 06 16:51 trash

-rw-r--r-- 1 chris techpubs 6204 Sep 23 09:34 travel

For a complete breakdown of this information, see ``File and directory attributes''. In fact, this version of the command is used so commonly, that it can be entered in shorthand, as l(C).

As we saw in ``Filenaming conventions'', filenames may begin with a dot, in which case, the files are hidden from normal directory listings. The ls -a (all) option displays hidden files as well as normal files, as follows:

$ ls -a

.

..

.history

.kshrc

.mailbox

.profile

cs-save

gav_make

glossary.s

graphics

intro.err

nohup.out

procs.txt

To list the contents of another directory, without first moving to that directory, use the ls command, specifying the directory to look at as an argument, as follows:

$ ls /u/workfiles/projects

This command line lists the contents of a directory called /u/workfiles/projects.

You need permission to read a directory before you can view its contents. See ``Access control for files and directories'' for an explanation of permissions.

The tilde-plus sequence (~+) is expanded by the shell to point to the current working directory (actually, the value of the PWD environment variable). A more useful variant of this notation is the tilde-minus notation (~-), which expands to the value of OLDPWD, that is, the previous working directory. This allows you to refer back to your earlier work without having to type in the relevant pathname, as follows:

$ ls -l

drwx------ 2 chris techpubs 64 Jul 07 17:19 tools

drwxr-xr-x 2 chris techpubs 80 Jul 06 16:51 trash

-rw-r--r-- 1 chris techpubs 6204 Sep 23 09:34 travel

$ cd ../project2

$ ls -l

-rw-r--r-- 1 chris techpubs 3137 Oct 24 17:49 agenda

drwxr-xr-x 2 chris techpubs 96 Aug 31 13:08 bin

$ ls -l ~-

drwx------ 2 chris techpubs 64 Jul 07 17:19 tools

drwxr-xr-x 2 chris techpubs 80 Jul 06 16:51 trash

-rw-r--r-- 1 chris techpubs 6204 Sep 23 09:34 travel

Similar questions