Viewing, copying, moving and deleting files
| ls | Display the contents of the current directory |
| ls -a | Display also hidden files and hidden directories |
| cp srcfilename /path/destfilename | Copy srcfilename into directory /path with name destfilename |
| cp -r /dir/name /path/dir/name | Copy the entire directory /name into /path/dir/name |
| rm name | Remove a file or directory called name |
| rm -r name | Remove an entire directory as well as its included files and subdirectories |
| mv filename /path/dir_name | Move file:filename into directory:/path/dir_name |
| mv oldfilename1 newfilename2 | Rename oldfilename1 to newfilename2 |
| cat myfile.txt | Display myfile.txt contents to screen |
| more myfile.txt | Display contents of myfile.txt in pages Press spacebar to view next page |
| head myfile.txt | Display first 10 lines of myfile.txt |
| head -15 impfile.file | Display first 15 lines of impfile.file |
| tail filename | Display last 10 lines of filename |
| tail -15 filename | Display last 15 lines filename |
| pwd | Display current working directory |
| cd /path/dir/name | Change directory to /path/dir/name |
| cd .. | Go directory up one step |
| mkdir dir_name | Create directory dir_name |
| rmdir dir_name | Delete directory dir_name |
I'll bring you guys with more commands and try not to overload. Meanwhile keep on practicing :)
No comments:
Post a Comment