10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
2. Shell Programming and Scripting
Hi,
I'd like find multiple file options to fetch different types of files.
find /path...// -type f -name "*.log" -o -name "*.req" -o -name "*.txt" -mtime +5 -exec ls -l {} \;
Where as in the above command only the last .txt files its retriving but not .log and .req files can body help... (1 Reply)
Discussion started by: Y.balakrishna
1 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
What am trying do is search for a directory that is owned by cm that only exists in a path that has a particular directory
ex: what I'm using now is
find . -user cm -name '*.rel' -type d -exec ls -dl {} \;
This is giving me stuff like this
./../../foo1/../../*.rel... (2 Replies)
Discussion started by: jtmed
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have two scripts that remove files. One works fine and is coded
find -name "syst*" -mtime +1 -exec rm {} \;
The other is almost the same - only thing missing is the '\'. On that script though I keep getting:
rm syst1202.file ?
etc
Does the \ make that difference or is it a... (3 Replies)
Discussion started by: Grueben
3 Replies
5. Shell Programming and Scripting
Hi all,
Please could someone help with the following command requirement.
I basically need to find files NEWER than a given file and order the result on time.
My attempt so far is as follows:
find . -newer <file_name> -exec ls -lrt {} ;\
But I dont seem to get the right result... (12 Replies)
Discussion started by: jonnyd
12 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
Am wanting to do a ls -l of the files and do a cat of it at the same time, ideally, I am hoping that the following work but obvisouly it is not working to what I am wanting it to ... hu hu hu :wall:
find . -name "BACKUP_TIMESTAMP.log" -exec "ls -l basename {} ; cat {}" \;
... (1 Reply)
Discussion started by: newbie_01
1 Replies
7. UNIX for Dummies Questions & Answers
I can't get this to work. Running a single command works fine:
find . -name "*.dat" -exec wc -l '{}' \;
gives me the file name and number of lines in each .dat file in the directory.
But what if I want to pipe commands, e.g. to grep something and get the number of lines with that pattern... (3 Replies)
Discussion started by: DJR
3 Replies
8. Shell Programming and Scripting
Hi People,
I have a directory full of compressed files (.Z extention)
In many of these files there is a string pattern (3800078163033)
I want to find all file names which contain this string in their text.
Regards,
Abhishek (2 Replies)
Discussion started by: max29583
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I'm using the following command to get a list of files on the system.
find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \;
however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (2 Replies)
Discussion started by: Sebarry
2 Replies
10. Shell Programming and Scripting
Hi everyone,
I've been racking my brains for ages on this and need your help/advice.
I am writing a script that is reading in file to process and putting them into a temporary file. The loop starts and the script gets the first file name, does what i needs to do (copy it) and then returns to... (2 Replies)
Discussion started by: Angoss
2 Replies