Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Thank you. Does this use the results of "file" command or will it produce a similar output? I am curious. Commented Oct 1, 2015 at 2:02
  • @A.Mist I am not 100% sure what you mean by "this". If you are referring to the grep -Z part, then yes: it produces a list of NUL terminated filenames, just like file -print0 does. The complete sequence produces nothing as output, it just moves the files. If you are new at this, it often helps to make a few files with known simple content ('aa', 'ab', or 'bb') in small directory hierarchy, under a new directory and try the commands out. Make it simple enough so that you know what should happen if you run such a sequence and can check the results. Commented Oct 1, 2015 at 4:41