Can `mv` move multiple files?

QuestionsQuestions8 SkillsProBasic Files OperationsOct, 04 2025
0117

Yes, the mv command can move multiple files at once. You can specify multiple source files followed by the destination directory. Here’s the syntax:

mv file1.txt file2.txt file3.txt /path/to/destination/

In this example, file1.txt, file2.txt, and file3.txt will be moved to the specified destination directory.

You can also use wildcards to move multiple files that match a pattern. For example, to move all .txt files:

mv *.txt /path/to/destination/

This command moves all files ending with .txt from the current directory to the specified destination.

If you have any more questions or need further assistance, feel free to ask!

0 Comments

no data
Be the first to share your comment!