How Do You Move Files & Directories with Linux Command Line?

Published: 21 August 2021
on channel: Virtual Assistant for Linux
84
2

The mv (Move) command is used to move one or more files or directories from one place to another. Apart from moving the files, it can also rename a file or directory.

For instance, to move a file named funny-story.txt from the current directory to Documents directory, the command would be:

mv funny-story.txt Documents/

If you want to move the a directory it is much the same way, so to move the Music directory into the documents directory you would

mv Music/ Documents/

If you want to just rename a file named funny-story.txt to hilarious-story.txt, you can use the mv command like:

mv funny-story.txt hilarious-story.txt

Just like renaming a file, you can rename a directory using mv command.

For example, to rename a directory named Docs_bckp to Docs_archive, the command would be:

mv Docs_bckp Docs_archive


Watch video How Do You Move Files & Directories with Linux Command Line? online, duration hours minute second in high quality that is uploaded to the channel Virtual Assistant for Linux 21 August 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 84 times and liked it 2 visitors.