[dot] PATH
A blog dedicated to my Linux experience and other great tools.
Saturday, November 10, 2012
Moving Directories which have a file of interest.
This command looks for files that have a ".ape" extension. It then takes the parent directory and moves it (the directory) to another location.
find . -name "*.ape" -type f -exec dirname {} \; | uniq | while read each; do mv "$each" dir2/; done;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment