ls

ls is another basic command in unix. just type it and you will get the list of all the files, directories in your current directory (pwd)

:> ls
myDetails.txt websites.txt newDirectory


But which of these are files? which are directories? here names suggest which is a file and which is a folder. But what if its more difficult to understand?
simple... use the ls -lrt command.

:> ls -lrt
total 150000
drwxr-xr-x myself someusr 50000 Nov 1 2010 newDirectory
-rw-r--r-- myself someusr 50000 Dec 10 2011 websites.txt
-rwxr--r-- some1 someusr 50000 May 4 2012 myDetails.txt

The first line tells us the total size of the current directory
then as you can see, there are 6 columns that follow.
The first column tell you whether it is a directory or a file and what permissions it has (read chmod later)
The second column tells you about the user who has created the file/directory.
The 4th column tells us the size of the file/directory. (in bytes)
The next one tells on which date was it last modified.
The last column tells us the name.

(more commands coming here)

Comments

Popular posts from this blog

Writing your own ejabberd Module

npm ECONNREFUSED error

Conditional Flow - Spring Batch Part 6