06-12-2008
Not able to delete the files in day wise...
Dear All,
I am not able to remove the files in my AIX 5.3 server.
My files List
/iims-home/data/uat1/batch/staging
-rw-r--r-- 1 iims iims 5743 Jun 12 09:04 ErrorReport2008-05-20 09-04-18.doc
-rw-r--r-- 1 iims iims 191213683 Jun 12 09:05 ErrorReport2008-05-20 09-05-19.doc
-rw-r--r-- 1 iims iims 456571 Jun 12 09:06 ErrorReport2008-05-20 09-06-06.doc
-rw-r--r-- 1 iims iims 2675 Jun 12 09:07 ErrorReport2008-05-20 09-07-48.doc
-rw-r--r-- 1 iims iims 5743 Jun 12 09:09 ErrorReport2008-05-20 09-09-29.doc
-rw-r--r-- 1 iims iims 2675 Jun 12 09:12 ErrorReport2008-05-20 09-12-55.doc
-rw-r--r-- 1 iims iims 5743 Jun 12 09:14 ErrorReport2008-05-20 09-14-40.doc
-rw-r--r-- 1 iims iims 2675 Jun 12 09:18 ErrorReport2008-05-20 09-18-02.doc
-rw-r--r-- 1 iims iims 5743 Jun 12 09:19 ErrorReport2008-05-20 09-19-51.doc
-rw-r--r-- 1 iims iims 191670648 Jun 12 09:22 ErrorReport2008-05-20 09-21-34.doc
-rw-r--r-- 1 iims iims 909134 Jun 12 09:22 ErrorReport2008-05-20 09-22-21.doc
-rw-r--r-- 1 iims iims 2675 Jun 12 09:23 ErrorReport2008-05-20 09-23-09.doc
-rw-r--r-- 1 iims iims 5743 Jun 12 09:24 ErrorReport2008-05-20 09-25-03.doc
if i give the following command it is not working
find /iims-home/data/uat1/batch/staging/ -name "ErrorReport2008-*" -mtime +1 -exec /bin/rm {} \;
When i try to do ls command also failing?
bash-3.00# ls -ltr ErrorReport2008-05-20 05*
ls: 0653-341 The file ErrorReport2008-05-20 does not exist.
ls: 0653-341 The file 05* does not exist.
i think in file name there is a space (between bold letters).
ErrorReport2008-05-20 09-21-34.doc
Per day these files are creating around 30 GB. So if I want to delete one day older files (or) every hour files, how can I do that?
Please help me on this..
Thanks & Regards,
BVIJAY
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
!hello ,
Any one can me how can i display files and directory in Pagewise.
how to change prompt in UNIX . (1 Reply)
Discussion started by: smdakram
1 Replies
2. Shell Programming and Scripting
i want to delete files that are one day old
condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)}
any modifications to
find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)
Discussion started by: maverick
4 Replies
3. Solaris
Hi guys,
I want to delete files from june 13 to june 30, using rm command can any one tell me the sintax to remove. I ahve hunderd of core files in my /var dir. so i want to clear last month core files. Thanks in Advance.:)) (2 Replies)
Discussion started by: kurva
2 Replies
4. Shell Programming and Scripting
i have a file which has a column that is unique
i am intending to serach it and if it is there to remove the row.
the file looks like
ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT
15 ,rig ,34 ,56 ,87 ,177 ,59 % ,PASS
23 ,wel ,45 ,76 ,56 ,177 ,59 % ... (0 Replies)
Discussion started by: gotam
0 Replies
5. Shell Programming and Scripting
Scottn, m really sorry but i have not got my answer yet.
my concern is how to delete the row !!!
i have a file which has a column that is unique
i am intending to serach it and if it is there to remove the row.
the file looks like
ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT... (9 Replies)
Discussion started by: gotam
9 Replies
6. Shell Programming and Scripting
I have a directory /opt/targets which generates more than 1000 files per day and I want to delete all the files which are more than 1 day old...ie 24hrs+
Please help.. (3 Replies)
Discussion started by: sunilrk07
3 Replies
7. Shell Programming and Scripting
Hi Experts ,
At a particular dir , How to delete subirectories that are more than 1 day old AND have NO files in them.
PS : -empty option is not working at my Sun OS version.
Thanks,
A (6 Replies)
Discussion started by: ajaypatil_am
6 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I have a requirement where I need to first capture the current day & move all the files from a particular directory based on a previous day.
i.e move all the files from one directory to another based on current day & a previous day. Here is what I am trying, but it gives me errors.... (2 Replies)
Discussion started by: dsfreddie
2 Replies
9. Shell Programming and Scripting
Hi,
Very good wishes to all!
Please help to provide the shell script for generating the record counts in filed wise from the .csv file
My question:
Source file:
Field1 Field2 Field3
abc 12f sLm
1234 hjd 12d
Hyd 34
Chn
My target file should generate the .csv file with the... (14 Replies)
Discussion started by: Kirands
14 Replies
10. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
rmm(1) General Commands Manual rmm(1)
NAME
rmm - remove messages (only available within the message handling system, mh)
SYNOPSIS
rmm [+folder] [msgs] [-help]
OPTIONS
Prints a list of the valid options to this command.
The default settings for this command are:
+folder defaults to the current folder msgs defaults to the current message
DESCRIPTION
The rmm command deletes the current message from the current folder.
You can specify messages and folders other than the current ones by using the +folder and msgs arguments.
The current message is not changed by rmm, so a next will advance to the next message in the folder as expected.
If you have defined a component rmmproc: in your file, then instead of simply renaming the message file, rmm will call the named program to
delete the file.
The rmm command removes messages by renaming the message files with a preceding comma. Many sites consider files that start with a comma to
be a temporary backup, and arrange for cron(8) to remove such files once a day.
PROFILE COMPONENTS
Path: To determine your Mail directory
rmmproc: Program to delete the message
FILES
The user profile.
SEE ALSO
rmf(1)
rmm(1)