[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;
Posted by Unknown at 10:31 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2017 (1)
    • ►  May (1)
  • ►  2016 (4)
    • ►  October (2)
    • ►  May (1)
    • ►  March (1)
  • ►  2015 (2)
    • ►  December (2)
  • ►  2014 (2)
    • ►  November (1)
    • ►  March (1)
  • ►  2013 (2)
    • ►  February (1)
    • ►  January (1)
  • ▼  2012 (4)
    • ▼  November (1)
      • Moving Directories which have a file of interest.
    • ►  August (1)
    • ►  June (1)
    • ►  May (1)
  • ►  2011 (19)
    • ►  December (1)
    • ►  November (3)
    • ►  October (4)
    • ►  September (1)
    • ►  August (2)
    • ►  July (3)
    • ►  June (1)
    • ►  April (2)
    • ►  March (2)
  • ►  2010 (2)
    • ►  November (2)
Awesome Inc. theme. Powered by Blogger.