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

Опубликовано: 21 Август 2021
на канале: 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


Смотрите видео How Do You Move Files & Directories with Linux Command Line? онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Virtual Assistant for Linux 21 Август 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 84 раз и оно понравилось 2 посетителям.