How Do I Move Files Except One in Linux?
Contents

How do I move files except one file in Linux?

Move All Files Except One

  1. find.
  2. grep.
  3. ls.
  4. mv.
  5. sed.
  6. xargs.

How do I exclude a file in Linux?

Exclude Files and Directories from a List. When you need to exclude a large number of different files and directories, you can use the rsync –exclude-from flag. To do so, create a text file with the name of the files and directories you want to exclude. Then, pass the name of the file to the –exlude-from option.

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