10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am trying to move all the file listed by below command to /tmp/testing directory
find ./ -maxdepth 1 -type f -mtime +3
I tried using -exec and xargs - none of the combination is working?
Please, help (3 Replies)
Discussion started by: saurabh84g
3 Replies
2. Shell Programming and Scripting
Hello,
i have an dynamical apache_cache that I need to clean all days (older tant one day) with an unix command :
find /usr/IBM/HTTPServer/apache_cache/ -name '*' -mtime +1 -print0|xargs -0 rm -r --
but it didn't work.
Could you explain me why.
So I will put below all my script :... (13 Replies)
Discussion started by: steiner
13 Replies
3. Shell Programming and Scripting
Hi,
I've got to setup a script that will run daily, and find a log file of a certain age, and then compress and transfer this file to a new location.
so far i've been able to specify the file i want with:
find . -name 'filename.*.log' -mtime 14 -exec compress -vf {} \;
this prints out... (4 Replies)
Discussion started by: horhif
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I'm currently using the following command to wipe clean a log file which can't be straight out RM'd:
cat /dev/null > server.log
I'm building this into a script and I'm current working on a command to run on each machine to do this automatically however I have multiple files so I need... (11 Replies)
Discussion started by: Deehem
11 Replies
5. Shell Programming and Scripting
my command deletes the oldest file from a folder and I'd like to have some type of output when the file is selected or deleted.
ls -t -1 | tail -n 1 | xargs rm
I'm not sure how to incorporate echo into this.
Thanks, (2 Replies)
Discussion started by: evanlivingston
2 Replies
6. Shell Programming and Scripting
Folks
I've been struggling this with for far too liong now and need your help!
I've been happily using grep for a search of a directory, to list the files which contain a string:
find . -type f -mtime -5 -print | xargs grep -l 'invoiceID=\"12345\"'
Now the list of 'invoiceID' I am... (4 Replies)
Discussion started by: daveaasmith
4 Replies
7. Shell Programming and Scripting
Hey guys - i have a script (below) that searches for current files in a particular directory.
However i was wondering how to make it search for "yesterdays" file. For instance it looks for a file from yesterday and no older than that.
I used stat command to check for file information:
... (6 Replies)
Discussion started by: DallasT
6 Replies
8. Shell Programming and Scripting
Hi, im having a problem with xargs, i want to cout word of each line in file, and i HAVE to use xargs, i tried:
cat file | xargs wc -w .....that uses all words in file like name of files and passed then to wc so it worte wc :somewordformfile is not i afile or directory
cat file | xargs -I{} wc... (3 Replies)
Discussion started by: Qwetek
3 Replies
9. Shell Programming and Scripting
I am looking for a command to take files with a specific date and cat them all into big file. I know I can use commands to list all of the files from a certain date. But I want to do that and take those files and make on large files containing all of them.
Any help would be great. This is being... (1 Reply)
Discussion started by: Jcheetwood
1 Replies
10. Shell Programming and Scripting
Hello,
I'm on a mac trying to have the follow cmd list the files after touch, but very unsuccessful. Please can you help.
sort $BOTHFILE | uniq -u | xargs -I {} -t touch {} >> $LOGFILE ;
BOTHFile contents in form of
/directory/file.txt
thanx (3 Replies)
Discussion started by: byblos
3 Replies