Linux - Rename, Move, Copy and Delete Files (mv, cp, rm)
Find code and diagrams at: https://ift.tt/2zY82iQ Renaming, moving, copying, and deleting files in Linux command line is easy. Renaming files uses the same command as move. As an administrator if you do not own the files you are interacting with you may have to add sudo to the beginning of the command to give yourself the required privileges. Rename Files mv file file2 – to rename a file use mv command followed by original file name, space and then new file name Move Files mv file folder/file – to move files use mv command followed by original file name, space and then new location and file name. BE CAREFUL because you can move AND rename a file at the same time. Copy Files cp file file.bak – to copy a file use the cp command followed by the original file, space and name of copy. Delete Files rm file – to delete a file use rm followed by file name rm file file.bak – to delete multiple files use rm followed by file name separated by spaces. Note: you can use wild cards for the remove command to delete multiple file. Such as rm *.bak . BE VERY CAREFUL WITH THIS!
View on YouTube
Find code and diagrams at: https://ift.tt/2zY82iQ Renaming, moving, copying, and deleting files in Linux command line is easy. Renaming files uses the same command as move. As an administrator if you do not own the files you are interacting with you may have to add sudo to the beginning of the command to give yourself the required privileges. Rename Files mv file file2 – to rename a file use mv command followed by original file name, space and then new file name Move Files mv file folder/file – to move files use mv command followed by original file name, space and then new location and file name. BE CAREFUL because you can move AND rename a file at the same time. Copy Files cp file file.bak – to copy a file use the cp command followed by the original file, space and name of copy. Delete Files rm file – to delete a file use rm followed by file name rm file file.bak – to delete multiple files use rm followed by file name separated by spaces. Note: you can use wild cards for the remove command to delete multiple file. Such as rm *.bak . BE VERY CAREFUL WITH THIS!
View on YouTube
Linux - Rename, Move, Copy and Delete Files (mv, cp, rm)
Reviewed by iot portal
on
7:39 AM
Rating:
Reviewed by iot portal
on
7:39 AM
Rating:
No comments: