10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have an inquiry on how do I use the find command in Solaris Unix to find some file ends with extension : txt, err in the root directory with modified date of 30days and this find command will also need to exclude b directory and its subdirectory. All the files from the above find criteria... (5 Replies)
Discussion started by: snowfrost88
5 Replies
2. Shell Programming and Scripting
Hi,
I am currently using the find below to remove old files. I am redirecting the listing to a file and then use a while-loop and do a rm
cd ${directory}
find . \( ! -name . -prune \) \( -type f -name "*.trc" -mtime +10 \) | sed 's#^./##' | sed "s#^#${directory}/#" 2>/dev/null | tee -a... (4 Replies)
Discussion started by: newbie_01
4 Replies
3. Shell Programming and Scripting
Hi All,
requirement is to find and remove the files from sub directories but it should exclude the files from parent directory.
At present i am using the below one but it finds and remove files from both parent and sub directories.
find ${PATH} -type f \( -name securitas\* -o -name \*gz... (1 Reply)
Discussion started by: Naveenkk
1 Replies
4. UNIX for Advanced & Expert Users
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies
5. Shell Programming and Scripting
Hi Forum,
I am using the below command to find files older than x days in a directory excluding subdirectories. From the previous forums I got to know that prune command helps us not to descend in subdirectories. Though I am using it here, not getting the desired result.
cd $dir... (8 Replies)
Discussion started by: jhilmil
8 Replies
6. UNIX for Dummies Questions & Answers
hi,
I need to find files that have been created less than 3 days ago. However, I need to only search specific directories.
I've searched about the net and found some useful commands such as :
find . -type d -name 'dir_to_exclude' -prune -o -print -mtime -3
however I cannot get it... (2 Replies)
Discussion started by: horhif
2 Replies
7. Shell Programming and Scripting
I have been searching, and cannot find an answer for this. I am trying to find all files for a user, lets call him (test001), and I want to exclude a specific directory.
Here is the command I run, it finds all files:
find / -user test001
I get this result:
> find / -user test001 ... (4 Replies)
Discussion started by: steve2x4
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a directory structure as below
/home/gad/Merl/a/a1.txt
/home/gad/Merl/b/a1.txt
/home/gad/Merl/c/a1.txt
How can I find the file a1.txt but not from directory 'a' and it(the filw) should loaded 6 days ago..
Can any one pls help,quick reply much appriciated..
Thanks. (1 Reply)
Discussion started by: jagadish_gaddam
1 Replies
9. Solaris
Hello,
Under one directory, I can use below command to find out the file names with string "Export terminated successfully without warnings"
grep -i -l "Export terminated successfully without warnings" *.*
My question is : how I find out the file names without including string
"Export... (5 Replies)
Discussion started by: GreatJerry
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a filename Location.txt in a directory /abc.
Similar name file is present in its subdirectory /abc/xyz.
I want to find the file which is present only in /abc and not in /abc/xyz.
Please any1 of u can provide a quick suggestion.
Its very urgent.
Thanks,
Amol (2 Replies)
Discussion started by: Amol_Dicholkar
2 Replies