![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| move files using wildcard | onlyjayaram | Shell Programming and Scripting | 1 | 07-24-2007 02:02 AM |
| copying to multiple directories using wildcard | logic0 | UNIX for Dummies Questions & Answers | 4 | 05-22-2007 09:09 AM |
| Disable wildcard | Rock | Shell Programming and Scripting | 5 | 01-24-2007 09:36 AM |
| Wildcard comparison | rdudejr | Shell Programming and Scripting | 2 | 08-02-2006 06:09 PM |
| wildcard | abhi | UNIX for Dummies Questions & Answers | 13 | 02-15-2005 01:43 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Find wildcard .shtml files in wildcard directories and removing them- How's it done?
I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this: /home/domains/www.domain2.com/tgp/ /home/domains/www.domain3.com/tgp/ /home/domains/www.domain4.com/tgp/ /home/domains/www.domain5.com/tgp/ So I've got 220 domains on this one box and in each of those domains I've got a directory called /tgp/ ...in /tgp/ directory I have hundreds of old .shtml files that I need to delete. If I use this command will it work or will it cause any damage? find /tgp -mtime +10 -name "*.shtml" -exec rm If this is not the best way to do this, which way should I handle this and what command could take care of this? |
![]() |
| Bookmarks |
| Tags |
| regex, regular expressions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|