Quick Answer: How Do I Move an Entire Directory in Unix?
Contents

To move a directory using the mv command pass the name of the directory to move followed by the destination.

How do I move an entire directory in Linux?

HowTo: Move A Folder In Linux Using mv Command

  1. mv documents /backups.
  2. mv * /nas03/users/home/v/vivek.
  3. mv /home/tom/foo /home/tom/bar /home/jerry.
  4. cd /home/tom mv foo bar /home/jerry.
  5. mv -v /home/tom/foo /home/tom/bar /home/jerry.
  6. mv -i foo /tmp.

15 сент. 2012 г.

How do I move a directory in Unix?

mv command is used to move files and directories.
…
mv command options.

option description
mv -f force move by overwriting destination file without prompt
mv -i interactive prompt before overwrite
mv -u update – move when source is newer than destination
mv -v verbose – print source and destination files
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest