ls ( list files )
ls > will display files and
folders in the present directory
ls -l > this displays all the files and folders with
detail information in the present directory. The detail information includes : file types , permissions, owner, group, size, last-modified date filename as below :
-rw-rw-r-- 1 name1 name2 0 Sep
29 14:29 black
-rw-rw-r-- 1 name1 name2 0 Sep
29 14:29 brown
drwxrwxr-x 2 name1 name2 4096 Sep 29 14:29 colors
drwxrwxr-x 2 name1 name2 4096 Sep 29 14:29 fruits
ls -lt > displays the files/folders sorting the list by date(latest at
the top and oldest at the bottom)
ls -ltr > displays the files/folders sorting the list by date(oldest
at the top and latest at the bottom)
ls -a > displays the hidden
files/folders whose name starts with "."
ls -R > displays the subdirectories
contents also.
ls -l | grep '^d' > displays only directories.
ls -lt >File1 > this will save the result of ls -lt to File1.
ls -l | grep '^d' > displays only directories.
ls -lt >File1 > this will save the result of ls -lt to File1.
GoTo_Main UNIX Page
NEXT
.
No comments:
Post a Comment