help me write a find command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers help me write a find command
# 1  
Old 06-06-2002
Question help me write a find command

At times I have thse Oracle logfiles that grow like crazy and fill up a specific file system. I wanted to write a find command that lists which are the biggest files from the search path..so
/qbidora02/oracledba/find . -name ....... <downward to the lowest level> and list file names, sizes and time stamp. any ideas?
thanks
Jigar
# 2  
Old 06-06-2002
Lightbulb

"Oracle logfiles that grow like crazy ......."

Yo!

Your DBA should know where the log files are/will be created....
there should be no finding.....

.......if not there is an issue!!!! Smilie


Now here is the command to find the files that end in "log"
and their listing!!!

find . \( -name "*log" \) -ls;

Smilie

Happy finding!!

Suresh
# 3  
Old 06-09-2002
Try this.....

find . -type f -name "*log" -ls | sort -rn +6;

This will also sort the results in filesize (descending). And will only include plain files (rather than including directories also).

Can filter further with things such as -user and a number of others....for more detail see the man page for find.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find matches and write the data before it

Hi all I am here for help once again I have two files One file is like this with one columns F2 B2 CAD KGM HTC CSP Second file is like this in 5 columns where firs column contain sometime entries of first file with space and other entries (12 Replies)
Discussion started by: Priyanka Chopra
12 Replies

2. Shell Programming and Scripting

Request to check: find common and write before it

Hi all, I have 2 big files with such kind of inputs File I File II I want the output file shuld contain Please let me knw scripting regarind this (1 Reply)
Discussion started by: manigrover
1 Replies

3. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

4. UNIX for Dummies Questions & Answers

How to find out in which directories a user can write?

Hi everybody, what command can show me the directories in which a certain user can write to? Kind Regards FranzB (2 Replies)
Discussion started by: FranzB
2 Replies

5. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

6. Shell Programming and Scripting

Find and write to a files

Hello my friends,I'm a new learner to programming in Linux so kindly can you help me to write this simple script for me and it is lists all text files "*.TXT" in a directory and writes the first line of each text-file to a file called "Aby_Name". Thank you so much. (12 Replies)
Discussion started by: Net-Man
12 Replies

7. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

8. Shell Programming and Scripting

Please help me to write a Script to find out whether website is up!!!!!!!

Hello friends I have to write a script in linux to find out the website is up or down..... Please help me in this thank you Jay (1 Reply)
Discussion started by: jai143
1 Replies

9. UNIX for Dummies Questions & Answers

how to write to file using fprintf in find command...

:D I once again am looking through the man pages and am still working on the find command to fully comprehend all its attributes.. i am a little stuck on a problem with how many options to -print there are and the only two I know how to use are printf and -print.. i can not make heads or tails of... (2 Replies)
Discussion started by: moxxx68
2 Replies

10. UNIX for Dummies Questions & Answers

find and write

Hi, I was able to succesfully search/find the files I needed using the command : find . -exec grep string {} /dev/null \; however, I would like to have the result written in a log file. Can someone please show me how to do this? Thanks in advance. Bong (3 Replies)
Discussion started by: bong m
3 Replies
Login or Register to Ask a Question