Linux Command Line (09) Moving and Renaming Files and Directories

Опубликовано: 01 Февраль 2020
на канале: MichaelsTechTutorials
7,188
105

Files and directories are moved with the "mv" command we would type mv then the source file then the destination file.

The source and destination can be either absolute paths or relative paths.

To move the file output.txt to a directory called Newdirectory, we would type:

mv output.txt Newdirectory

There is no rename command in the Linux Command Line, to rename a file we use the mv command with the old filename then the new filename.

Directories can be moved and renamed with the "mv" command just like files.

When moving files and directories the force option is set as the default, meaning if the destination file already exists, it will be overwritten.

Using the "n" option for no-clobber will not move the file if the destination file exists

Using the "i" for interactive option will ask to to confirm before overwriting an existing destination file.

See the complete LCL playlist at:    • Linux Command Line  (01) What Is The ...  

Website link:
https://thefrugalcomputerguy.com/linu...


На этой странице сайта вы можете посмотреть видео онлайн Linux Command Line (09) Moving and Renaming Files and Directories длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь MichaelsTechTutorials 01 Февраль 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 7,188 раз и оно понравилось 105 зрителям. Приятного просмотра!