On Mon November 5 2007 00:03, Ronald Wiplinger wrote:
> I am looking for some bash scripts:
>
> 1. I want to list all text files of one directory with a blank line
> in between.
> Currently I just use  grep "" *

You are listing the content of the files with this command and I don't 
get a blank line in between.
When I want to list the content of ASCII files with the filename 
preceding each, I use 
 more * > tmp.txt

> 2. I want to delete files older than x (e.g., 3 minutes, 3 hours, 3
> days, ...)

For x in days:
 find . -mtime +x -print -exec \rm -f '{}' \;

For x in minutes change -mtime to -mmin .

-- 
Carlos FL

Who is General Failure, and why is he reading my disk?
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to