10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
First time poster. I am looking for a way to script or program the process of moving files from one folder to another, automatically, based on the count of files in the destination folder.
I was thinking a shell script would work, but am open to the suggestions of the experts... (6 Replies)
Discussion started by: comtech
6 Replies
2. Shell Programming and Scripting
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)
Discussion started by: anurupa777
6 Replies
3. Shell Programming and Scripting
Hello
I have a directory with a list of files which have a particular numerical suffix.
E.g
filename_0
filename_1
filename_18500
filename_10000
I want to delete all files from this directory which have a filename which have a numerical suffix greater than 10540.
So any files... (5 Replies)
Discussion started by: kamal_p_99
5 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: manushi88
9 Replies
5. Shell Programming and Scripting
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)
Discussion started by: Xterra
4 Replies
6. Shell Programming and Scripting
I have to write one script which will delete the files in the below passion.
If today is 17-Feb-2010 then the script delete only 17-JAN-2010 files from the directory.
Could you please help me, How will I delete the files when the year is leap year, if today is 30th Mar 2010 then how will... (1 Reply)
Discussion started by: kandi.reddy
1 Replies
7. UNIX for Dummies Questions & Answers
I need a little help...
I have a file with 3 fields,
Time/Date, IP address, UniqueID
I have a 2nd file of UniqueIDs.
I want to either (which ever is easier):
1. delete entries in file 1 that have a UniqueID in file 2
2. create a new file with the fields from File 1, excluding the... (4 Replies)
Discussion started by: goldie363
4 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: ammu
1 Replies
9. Shell Programming and Scripting
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)
Discussion started by: pulkit
4 Replies
10. Shell Programming and Scripting
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)
Discussion started by: ravi2082
5 Replies