10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {}
But the ls command is the working on the files which have white... (16 Replies)
Discussion started by: karumudi7
16 Replies
2. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
3. UNIX for Advanced & Expert Users
Hello, i'm trying to solve this script.
List, one at a time, all files larger than 100K in the /home/username directory tree. Give the
user the option to delete or compress the file, then proceed to show the next one. Write to a
logfile the names of all deleted files and the deletion times.
I... (7 Replies)
Discussion started by: jose2802
7 Replies
4. Shell Programming and Scripting
I have a large file (file1) that has 96770154 lines and a smaller file (file2) that has 3 lines. I want to remove all of the strings from file1 that occur in file2.
file1 looks like this:
DOGDOGNODOGTESTCAT
CATHELLOBYEEBYEFAT
CATCATDOGDOGCATYESGOOD
file2 looks like this:
YES... (10 Replies)
Discussion started by: verse123
10 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a file that contains >4000 inode numbers. Each inode number is on separate row. I'd like to delete all this files. Any idea how could I do it?
Thank you.
Andrej (3 Replies)
Discussion started by: andrejm
3 Replies
6. Shell Programming and Scripting
I have a file with the contents below
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
jan_t=null;feb_t=feb;mar_t=mar;year=2010
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
I want to extract out all the fields values ending with "_t" , however, i want to exclude feb_t and mar_t from the results
In... (6 Replies)
Discussion started by: alienated
6 Replies
7. Shell Programming and Scripting
Hi all
I currently use the following in shell.
#!/bin/sh
while read LINE
do
perl -i -ne "$/ = ''; print if !m'Using archive: ${LINE}'ms;" "datafile"
done < "listfile"
NOTE the single quote delimiters in the expression. It's highly likely the 'LINE' may very well have characters in it... (3 Replies)
Discussion started by: Festus Hagen
3 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I'm looking for a bit of help. Im trying to search a file for lines that contain white spaces at the end of the lines. This is what I'm using where $param is the path and file name and it redirects the output to a txt file :
echo | grep -n ' $' $param >> $2
Is it possible to have... (8 Replies)
Discussion started by: gintreach
8 Replies
9. AIX
Hi,
I need to login to a remote server.
Go to a particular path.
Get the lists of files on that path.There may be n number of files.
I need to delete only those files from above created list which are 7 days older.
I have achieved above using ftp protocol, but now the constraint has... (0 Replies)
Discussion started by: mail_amitnagpal
0 Replies
10. Shell Programming and Scripting
dear all
i trying to list all files within a directory. I want to exclude all subdirectory and some files, with using below statement, but it not exclude the files which start with "&" and end with "SL" , is there any things wrong with the below statement ?
TIA
cd /myaccount/mydirectory... (6 Replies)
Discussion started by: ayang
6 Replies