10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Below command works fine when we have other files apart from hello.txtls | ggrep -v hello* | xargs rm -rfBut, if there is only one file i.e hello.txt the rm command does not find anything to delete and the script hangs.
While there could be trivial ways to check using if conditions if... (6 Replies)
Discussion started by: mohtashims
6 Replies
2. Shell Programming and Scripting
I have list of files like below, I want to delete files older than 2 days except S0000000.LOG, I have command find /export/home/X_GZPQJK/out/file* -mtime +1 -exec rm {} \; but it is deleting S0000000.LOG, Can you please help me how to modify command to delete except S0000000.LOG.
$ ls -ltr... (2 Replies)
Discussion started by: prince1987
2 Replies
3. Shell Programming and Scripting
can anyone tell me what is the commands to delete the below particular word in the all files located in one particular file path
files/ll>grep "/ftp/" test.kell
ftp -m uskmc -d /ftp/ -i filename.zip
output should be :
ftp -m uskmc -d -i filename.zip (4 Replies)
Discussion started by: ramkumar15
4 Replies
4. Shell Programming and Scripting
Hello Friends,
I have directory called /tmp. which stores the log files.
Whenever it becomes full, i want to delete half of files from all log files.
even after deleting the files, if space is more than 90% then it should delete rest of half files.
While deleting files, older files... (7 Replies)
Discussion started by: Nakul_sh
7 Replies
5. Shell Programming and Scripting
Hi All,
I've created 2 files
touch -t 201309101234 aa10
touch -t 201309111234 aa11
Exact 60 days before from today date is SEPT 12th . As per the following command as i gave +60 means the files which were created before sept12th should be deleted
find /etc/logs/*aa* -type f -atime +60... (5 Replies)
Discussion started by: smile689
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to delete all the log files that was created on year 2008. My command is not working. Any idea?
find . -name '*.log' -mtime 1460 -exec ls -lt {} \;
Thank you. (2 Replies)
Discussion started by: samnyc
2 Replies
7. Shell Programming and Scripting
Hi
I have the following files generated by different users on a directory
-rw-rw-r-- 1 NAME1 database03 809 Nov 17 10:41 PCAS_CARD_TRANS_OFF.1111171041.lg
-rw-rw-r-- 1 richard ccsdba 10968411 Nov 17 10:43 load_123_RX0_0.1111171016.lg
-rw-rw-r-- 1 DEV db03 10713 Nov 17... (5 Replies)
Discussion started by: bobby1015
5 Replies
8. Shell Programming and Scripting
HI All,
I have a log file where the logs will be in the format as given below:
2011-05-25 02:32:51 INFO PROCESS STARTING
2011-05-25 02:32:52 INFO PROCESS STARTED
.
.
.
I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 Replies)
Discussion started by: rvhg16
3 Replies
9. Solaris
Hi,
We have an application ASPA . The application related processes are running in /ASPA/bin directory . now whenever a process terminates abruptly , a core file should be generated (correct me if i am wrong) in the
/ASPA/bin directory . But i am not able to see any such files . The... (4 Replies)
Discussion started by: asalman.qazi
4 Replies
10. UNIX for Dummies Questions & Answers
I have this unix version 3.0
"UNIX_SV server 4.0 3.0 3425 Pentium II(TM)-ISA/PCI"
can i delete or disable the system generated account as "daemon";"uucp";"sys";"adm";"listen";"bin"
and if yes how can i do it?
Regards (1 Reply)
Discussion started by: sak900354
1 Replies