5/16/2023 0 Comments Move files linuxmv file1.txt file.2.txt file3.txt target_directory If you want to move multiple files at once, just provide all the files to the move command followed by the destination directory. This command will move the source_file and put it in the target_directory. To do that, you just have to specify the source file and the destination directory or file. The first and the simplest example is to move a file. How to move a file to different directory Let’s see some of the useful examples of the mv command. Using mv command is fairly simple and if you learn a few options, it will become even better. Mv command can also be used for renaming a file. That’s what a cut-paste operation, isn’t it? cp command = copy and paste Which means that when you use the mv command on a file or directory, the file or directory is moved to a new place and the source file/directory doesn’t exist anymore. Whereas the mv command can be equated with the cut-paste operation. You can think of the cp command as a copy-paste operation. The syntax is similar to the cp command in Linux however there is one fundamental difference between these two commands. mv stands for move and is essentially used for moving files or directories from one location to another. Mv is one of the must known commands in Linux.
0 Comments
Leave a Reply. |