ls : list the files
touch :- to create the file system.
cat :- to view the content of the file
vi :- to edit/add the content in file.
for examples
Below you can see how you can list the files,create file "redhat" and add content as "this is redhat file " and how can you cat redhat file.
Please see below for some more ls commands with examples :-
ls | List the Files / directories |
ls –a | List All files and directories including hidden Files |
ls -l | List All information about files/directories |
ls –ld | List Directory Information |
ls -lt | List Last Modified Time Using |
ls –r | List files with reverse order |
ls –ltr | Order Files Based on Last Modified Time (In Reverse Order) Using |
ls –R | List Files Recursively Using |
ls –lh | List files in KB, MB, etc |
ls –m | LIst files with comma separation |
ls –i | Display File inode Number Using |
ls –q | Hide Control Characters Using |
ls –n | Display File UID and GID Using |
You may want to know
how to differentiate b/w file and Directory ?
No comments:
Post a Comment