find/xargs question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi...

i have what i think is a combination find/xargs question....

i'm trying to search through a dir tree for files matching certain patterns
and i want to rename the files. i'd also like to ignore certain dirs.

ie...

[root@lserver2 wctest]# ls -al
total 24
drwxr-xr-x  5 root root 4096 Dec 27 21:46 .
drwxr-xr-x 48 root root 4096 Dec 27 21:45 ..
drwxr-xr-x  3 root root 4096 Dec 27 21:46 class
drwxr-xr-x  3 root root 4096 Dec 27 21:46 faculty
drwxr-xr-x  7 root root 4096 Dec 27 21:46 .svn

./class:
total 20
drwxr-xr-x 3 root root 4096 Dec 27 21:46 .
drwxr-xr-x 5 root root 4096 Dec 27 21:46 ..
-rw-r--r-- 1 root root  248 Dec 27 21:46 childClass.py
drwxr-xr-x 7 root root 4096 Dec 27 21:46 .svn
-rw-r--r-- 1 root root  239 Dec 27 21:46 zu_fl_2772Class.py  <<<<<

i'd like to find any file with "zu_fl*Class" and replace it with
zu..ClassFFFF. so basically, i'm finding any given file with a pattern
followed by Class, and adding FFFF to it along with the file extension.

i'd also like to ignore specific dirs as well... in this case, i'd like to
ignore the ".svn" folder...

this should be pretty esay, but i can't seem to get the nuances down.

any thoughts/preferrably pointers as to how to perform this action..

thanks

-bruce

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux