10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
I am trying to find all .rhosts files on some unix systems. I tried just -name ".rhosts" but we have a lot of really large NFS and MVFS systems that I do not want to crawl and I am having a hard time excluding them. I also need to scan more than just /root /home and /users, so I really need to scan... (1 Reply)
Discussion started by: nitrobass24
1 Replies
4. Shell Programming and Scripting
HI
Find command is sorting differently in different machines.
I am trying a script to find file with -name option and delete the files other and keep the latest. the problem I am facing is in one machine find command is returning output sorted with oldest first and latest . But in another... (1 Reply)
Discussion started by: ningy
1 Replies
5. UNIX for Dummies Questions & Answers
Hi there
I have to enhance my current file looping to ensure the oldest file being processed first.
current command:
for FILENAME in `find $MY_DIRECTORY -follow -type f`
I manage to get command for order by date modified descending, just can't get the ascending order. Please help
for... (3 Replies)
Discussion started by: elsie512
3 Replies
6. Shell Programming and Scripting
Hello All,
Is there a way to make exec do a couple of operations on a single input from find?
For example,
find . -type d -exec ls -l "{}" ";"
I would like to give the result of each "ls -l" in the above to a wc. Is that possible?
I want to ls -l | wc -l inside exec. How do I... (1 Reply)
Discussion started by: prasanna1157
1 Replies
7. Shell Programming and Scripting
find -type d -name "TC_*" | sort
That's what I have so far... it finds the appropriate directories and then sorts them. But, when it comes to nested subdirectories, it only sorts relative to the first subdirectory. I want it to sort based on the directory at the end of the path. Does anyone know... (3 Replies)
Discussion started by: crimsondarkn
3 Replies
8. Shell Programming and Scripting
Hi All,
I knew you all will scold me after reading this thread, but i got stuck in the definition and usage of kill, so begging all your pardon.
I have a java process, which used to create small threads/sub process....so i want to kill that main java by kill -0 <pid>......
so that 1st it... (1 Reply)
Discussion started by: manas_ranjan
1 Replies
9. Shell Programming and Scripting
hi folks,
I want to select all files older than 13 days from a specified directory
for that i used
find /home/amar -name '*.*' -mtime 13
but it gives me all the files from subdirectories also, I dont want that
I want files only from /home/amar and not from /home/amar/abc/..
which... (8 Replies)
Discussion started by: amarnath
8 Replies
10. 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