RE: Unix Command

RE: Unix Command

 

  

You could use find to choose only the files with a particular time stamp by
saying not newer than file1 and newer than file2 e.g

$ find . \( ! -newer croutOVAVMaWNb -a -newer cops.lock \) -exec ls -l {} \;
-rw-r--r-- 1 root root 4 Jan 24 02:46 ./.csvxvmwrapper.cache
-rwxrw-r-- 1 tle1 appclrc 75 Jan 24 06:56 ./xx.ksh
find: cannot read dir ./.odus: Permission denied
-rw-r--r-- 1 dbmsftp sybase 542824 Jan 24 20:12
./p4017526_9206_LINUX.zip
-rw-r--r-- 1 dbmsftp sybase 8407370 Jan 26 17:18
./p4002994_9204_SOLARIS64.zip
-rw-r--r-- 1 dbmsftp sybase 5751104 Jan 26 17:18
./p4002994_9204_LINUX.zip
-rw-r--r-- 1 dbmsftp sybase 4644158 Jan 26 17:19
./p4003006_9205_LINUX.zip
-rw-r--r-- 1 dbmsftp sybase 6166212 Jan 26 17:20
./p4003006_9205_SOLARIS64.zip
-rw-r--r-- 1 dbmsftp sybase 3417646 Jan 26 17:20
./p4003051_10102_LINUX.zip
-rw-r--r-- 1 dbmsftp sybase 1778210 Jan 26 17:20
./p4003062_10103_LINUX.zip
-rw-r--r-- 1 dbmsftp sybase 3248339 Jan 26 17:31
./p4003062_10103_SOLARIS64.zip
-rw-r--r-- 1 dbmsftp sybase 6160129 Jan 26 17:31
./p4003051_10102_SOLARIS64.zip
-rw------- 1 oracle dba 0 Jan 26 19:00 ./croutOVAVMaWNb
$ ls -l cops.lock croutOVAVMaWNb
-rw------- 1 root other 6 Jan 23 05:36 cops.lock
-rw------- 1 oracle dba 0 Jan 26 19:00 croutOVAVMaWNb


-----Original Message-----
From: Kumar Pradip
[mailto:oracledba-ezmlmshield-x54778729.[Email address protected]
Sent: Friday, January 21, 2005 1:10 PM
To: LazyDBA Discussion
Subject: RE: Unix Command


find command with the help of touch can do that)
Use find to find all the files newer than another file (if one doesn't exist
use touch to create one) with timestamp of Jan 10.

find . -newer xx -exec rm -f {} \;

If needed create the file xx with desired timestamp
touch -t 200501101200.00 xx
emadbagrp:pkumar4> ls -l xx
-rw-r--r-- 1 pkumar4 appenab 1169 Jan 10 12:00 xx

-----Original Message-----
From: Edwards Ed
[mailto:oracledba-ezmlmshield-x75856029.[Email address protected]
Sent: Friday, January 21, 2005 12:35 PM
To: LazyDBA Discussion
Subject: Unix Command


To All,
Is there a Unix command to remove all files that are dated Jan 10:

ls -l | grep 'Jan 10'



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html


==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html


==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================


Oracle LazyDBA home page