1. Commands for navigating directories
lsis the command for listing files in a directoryls -awill display all files including hidden files within a directoryls -alwill display all files + hidden files and their permissionspwdAbbrv. for Print Working Directory - it will output the aboslute path of directory you're incd /home/kvisis the command for changing directory to/home/kvis- Typing
cdalone, will go to the user's home folder cd ..will move a level up like a back buttoncd -will return to the previous directory you were incp file_to_copy.txt new_file.txtwill copyfile_to_copy.txtand make a new file with the same contents in the same directory callednew_file.txt. First argument is always the source and the second argument is always the destinationcp -r dir_to_copy/ new_copy_dir/is used to copy entire directories. You must use the-rflag (recursive flag) in order to copy a dir and everything within itrm file_to_copy.txtwill delete the filerm -r dir_to_remove/will delete an empty directoryrm -rf dir_with_content_to_remove/will delete a directory and the data within it as well! BE CAREFUL with this commandmkdir images/will create an empty directory calledimagesmkdir -p movies/2004/will createmoviesdirectory along with an unlimited amount subdirectories beneath it.touch new_file.txtwill create a new empty file callednew_file
For More Useful Commands, visit this page
No comments to display
No comments to display