Discuss Shell Script Problem in the Linux Help forum on Dev Shed. Shell Script Problem Linux Help forum discussing topics including usage, troubleshooting, modules, and distributions. Linux is an open source OS, based on UNIX.
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
Posts: 548
Time spent in forums: 1 Week 1 Day 20 h 21 m 37 sec
Reputation Power: 42
Shell expansion.
When you pass
Code:
/var/spool/qmailscan/quarantine/new/*
to find the '*' portion of that get expanded into everything below the .../quaratine/new/ directory. So if there are 200 files below there you have, in effect, passed 200 files to find. find takes a starting point and recursively searches from there. You can limit the recursion with the -prune flag (IIRC, man find to be sure).
Also, if you are looking for everything, you dont need to pass '*' to -name, you can just let find output everything it finds. The -name flag is generally used to limit output.
Just out of curiosity, is ther any reason you are not just doing something like
Code:
rm -rf /var/spool/qmailscan/quarantine/new
Since it seems like you are not limiting the search to any subset of what is in there...
__________________
-- I'll provide you with reference points; if they dont work, refer to something else.
While I've regularly been provided 'working' software that fails to build or work as advertised I've yet to face a Copyright/Warranty/License that isnt exact to the finest detail. Priorities, my friend. Priorities.
Posts: 77
Time spent in forums: 19 h 39 m 33 sec
Reputation Power: 21
Quote:
Originally Posted by L7Sqr
Just out of curiosity, is ther any reason you are not just doing something like
Code:
rm -rf /var/spool/qmailscan/quarantine/new
None, though I don't want to get rid of the new dir, just what's in it. so I would add a /* after new. I could do something like that and make a cron job, sure.
But also, how about this: if I want to delete all the files in new daily, could I just treat that dir as a tmp dir and put a line in /etc/cron.daily/tmpwatch? Something like this...
Accelerating Trading Partner Performance One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.
Competing on Analytics This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.
Cost Effective Scaling with Virtualization and Coyote Point Systems An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.
Five Checkpoints to Implementing IP Telephony Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.
Hosted Email Security: Staying Ahead of New Threats In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.