Mailinglist Archive: opensuse (2995 mails)
| < Previous | Next > |
Re: [opensuse] some bash hints, please
- From: Aaron Kulkis <akulkis00@xxxxxxxxxx>
- Date: Mon, 05 Nov 2007 20:11:55 -0500
- Message-id: <472FBF5B.1020302@xxxxxxxxxx>
Pavel Nemec wrote:
find using the -mtime and the -exec option is
more appropriate.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
Dne Monday 05 November 2007 08:03:18 Ronald Wiplinger napsal(a):
I am looking for some bash scripts:Text files? You mean file.txt, or file with text mime type?
1. I want to list all text files of one directory with a blank line in
between.
Currently I just use grep "" *
100+1 how to do this.
- ls *.txt
- find . -name "*.txt"
if you need use mime types
try
ls | xargs file {} | grep text
2. I want to delete files older than x (e.g., 3 minutes, 3 hours, 3man find, look for TESTS
days, ...)
or somethink like
ls -l | awk ' if($6>"2007-11-06") {print $0}'
find using the -mtime and the -exec option is
more appropriate.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |