Here is the script I want to run to deleted log files after a certain time:
Code:
touch /usr/WebSphere/AppServer/profiles/AppSrv01/apps/RSA/logs
find /usr/WebSphere/AppServer/profiles/AppSrv01/apps/RSA/logs -atime +120 - exec rm -rf {}\;
Exerytime I run it, it throws me the error:
Code:
find: paths must precede expression: -
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat
i want to remove *.req files from directory
/opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log
i executed command find . -name '*.req' -mtime +2 -exec rm {} \;
but it is running since hours and free space in /opt is same as old 7.4 GB .
why it is not removing files ?
I'm trying to get this script to work
Code:
find /media/-Arhiiv-/0day* -mtime -7 -exec cp {} /home/user/Dropbox/music/ \;
Everyting works fine but it just copy files not folders. I need that it will copy folders.
If I edit a code and add -r then it work but then the -mtime dont work.
Hi,
I have two scripts that remove files. One works fine and is coded
Code:
find -name "syst*" -mtime +1 -exec rm {} \;
The other is almost the same - only thing missing is the '\'.
Hi,
I need to delete the last N days file using find.
I am trying to use
find . -mtime -10 -print
which lists down required files.
but when i use
find . -mtime -10 -exec ls -lrt {} \;
it gives me all files in the directory including the required files but the required files are having ./ preceded with them.
Now when I tried
find .
i feel weird with this 2 command
Code:
find /tmp/*test* -user `whoami` -mtime +1 -type f -exec rm -f {}\;
find /tmp/*test* -user `whoami` -mtime +1 -type f -exec ls -lrt {}\;
the first one return correct which only delete those filename that consist *test* where second command it listed all the files inside the directory which including those filename that not *test*
can someone help to ex
Hi ,
I imported find command I have on my hp-ux server to clean up the /tmp of my new IBM AIX servers.
Though, the commands always fails in the cron but if I past it at the prompt, it works find.
I'm on Solaris 10 and I have tested the following with ksh(88), bash(3.00) and zsh(4.2.1).
The following code doesn't yield any result:
function foo {
echo "Hello World"
}
find somedir -exec foo \;
The find does match several files (as shown by replacing -exec ...
Hi all,
Please could someone help with the following command requirement.
I basically need to find files NEWER than a given file and order the result on time.
My attempt so far is as follows:
Code:
find . -newer <file_name> -exec ls -lrt {} ;\
But I dont seem to get the right result and more files are returned.
Any ideas?
Thanks in advance,
jd