Linux

Basic Linux Commands




.

 

  1. Work with File
    1. Display File
    2. If you write the command more and a name of a file then the file will be displayed.

      User can controle the output:

      • press space...the next screen is displayed
      • press enter...the next row is displayed
      • press q.......the command is finished

    3. Copy File
    4. The command

      cp file_1 file_2

      copies file_1 to file_2. The both files must be in the same working directory. If they are in various directories, the path must be given.

    5. Rename and/or Move the File
    6. The command

      mv file_1 file_2

      moves file_1 to file_2. The both files must be in the same working directory. If they are in various directories, the path must be given. The file_1 is removed from the disk.

    7. Remove File
    8. The command

      rm file_a

      removes the file_a from the system at all. If you use wildcard. For example

      rm h*c

      you will remove all files beginning with h and ending with c which are in working directory. If you write

      rm *

      you will erase all files from your working directory. If you write

      rm -i *

      it will be done also but the system will ask for permission before removing each file.

      The command

      rm -r your_file

      causes removing of the directory your_file even if this directory is not empty.

      Attention!

      Command
      rm -r /
      will erase all your directories (including not empty directories). .

 

Google

Sections:



LinuxIdiot Home
Linux vi commands
Linux Basic Commands
Directory Structure
Choosing Linux

 Site Map | All rights reserved 2007