![]() When you use the -i option, the mv command prompts before overwriting exiting files with same name. Use the -foption, forces the mv command to overwrite existing file with same name in the destination without prompted. The command above moves myfile.txt into the specified directory called private inside your home folder. If you wish to move myfile.txt into a different directory in your home folder called private, simply run the commands below: The command above moves or deletes myfile.txt and create a new file with content called myprivate.txt This saves a copy of the original file instead of overwriting it.įor example, if you want to rename a file called myfile.txt to myprivate.txt, simply run the commands below: If you use the -b or –backup options, mv will rename the destination file if it exists, appending a suffix to its file name. ![]() The -i or - interactive option, mv prompts before overwriting exiting content Use the -f or –force, mv does not prompt before overwriting existing content Use the -b mv behaves like –backup but does not accept an argument If you use the -backup option, mv make a backup of each existing destination file Replace DESTINATION with the destination of the file or folder ![]() Replace SOURCE with the source of the file or folder
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |