My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
hi
i have a set of similar files. i want to delete lines until certain pattern appears in those files. for a single file the following command can be used but i want to do it for all the files at a time since the number is in thousands.
awk '/PATTERN/{i++}i' file (6 Replies)
In folder there are files
(eg ABS_18APR2012_XYZ.csv
DSE_17APR2012_ABE.csv) .
My requirement is to delete all the files except today's timestamp
I tried doing this to list all the files not having today's date timestamp
#!/bin/ksh
DATE=`date +"%d%h%Y"`
DIR=/data/rfs/... (9 Replies)
I have several files in a folder and I would like to delete the ones that do not contain all the required information (size) let say 1kb.
Any ideas? (4 Replies)
Hi,
I have some log files created in the following fashion
Ex:
file name modified date
1) s.log1 01-jan-08
2) s.log2 02-jan-08
3) s.log3 03-jan-08
4) s.log4 04-jan-08
Now I want to have the latest 2 logs and delete the others.
Can you tell me the one liner /... (1 Reply)
Hello,
Can anyone pls. provide me with the command for deleting files older then 15 days with a restriction to keep at least 5 files in a directory even if they are older then 15 days.
Any help will be highly appreciated.
Thanks,
Pulkit (4 Replies)
Hi Folks
I am pretty new to unix and shellscripting.
I need help on writing logic on traversing recursively through a set of directories under a top-level folder and delete files(mostly text) which are 1 month old.
Can you people help me on this?
Thanks a lot
Ravi (5 Replies)
Hello,
In unix what is the command to delete files created on a particular date.
for example: I have a list of files in a directory
Nov 8 08:30 abc
Nov 8 17:00 xyz
Nov 9 12:30 test
Nov 9 14:45 test2
Nov 9 18:15 quick
Nov 10 07:20 quick2
Nov 11 19:00 quick3
Now i would like to delete... (1 Reply)
Hi all,
I want to delete all files in a directory which are older than a given date.
I thought of doing it by creating a file by the required date by using touch command. And then i would use find command on that file and try to find files older than that.
I searched the man and found a... (3 Replies)