Some Basic Linux Files commands

Posted by Dev On March 10, 2012 0 comments
I am presenting some basic  linux commands which is very useful for the newbie:
(1) Files related commands
  • ls -l   :List files in current directory using long format.
  • ls -al :List files in current directory with hidden files.
  • ls -F :List files in current directory and indicate the files types.
  • rm name  :Remove a file or directory called name.
  • rm -rf  name  :Remove all directory and subdirectory under name directory.
  • cp filename /home/dev  :Copy the file called filename to the /home/dev directory.
  • cat filename  :To display the content of file named filename.
  • more filename  :To display file named filename one page at a time, when u want to proceed to next page   use the spacebar.
  • head filename   :To display the first 10 lines of the file called filename.
  • tail filename      :To display the last 10 lines of the file called filename. (tail -f file: output the last 10 line contents of file named file.)
  • touch filename  :To create a file named filename.
  •  mv file1 file2    :Rename or move file 1 to file2 if file2 existing directory, moves file1 into files2.

Next will be related to process management: follow me

0 comments:

Post a Comment