Professional Documents
Culture Documents
Linux Commands:: 1) Copy A File
Linux Commands:: 1) Copy A File
1) Copy a file:
2) Copy directory :
a. cp <directory> <destination>
b. with contents of directory:
cp <directory> <destination> -r
1) rename a file:
C:\> mv <current name> <new name>
2) to move a file:
mv <source> <destination>
3) remove a file
rm <filename>
4) remove a directory
rm -r <directory name>
5) to view file
Cat <filename>
a. To view whole file
More <filename> or less <filename>
b. To view first few lines
i. head <filename> ( by default display first 10 lines)
c. To view last few lines
i. tail <filename> ( by default display last 10 lines)
6) text editor: nano
a. available on any distribution
b. syntax: nano <filename>
c. Alt+u to undo
7) powerful industry standard text editor: vim or emacs
8)