10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
2. 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
3. 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
4. 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
5. Shell Programming and Scripting
Hi,
I have to find files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..I tried to use maxdepth..but it is not working in AIX. (2 Replies)
Discussion started by: vsachan
2 Replies
6. 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
7. 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
8. Shell Programming and Scripting
hi all,
i need to capture all the files in a directory and its subdirectories that have owner name different than the root owner.
for one file it is " stat -c %U filename " but i need to search for each and every file and record it.
thanks in advance (14 Replies)
Discussion started by: vyasa
14 Replies
9. Shell Programming and Scripting
I'm looking to write a ksh code with will be alble to find a word like 'toto' in all files going from my current directory.
eg.
/doc ----------->have: text.c which "toto"
/doc/usr-------->have: build.pc, help.java which "toto"
/doc/usr/cach -->have: test.sh which "toto"
/doc/build... (4 Replies)
Discussion started by: yeclota
4 Replies
10. UNIX for Dummies Questions & Answers
Is there a command or shell script which can be used for Finding all files created by a specified userid in a directory and its subdirectories.
Say, I want to find all such files in directory /abc as well as in all the subdirectories such as /abc/xyz or /abc/xyz/pqr aqnd so on which was created... (5 Replies)
Discussion started by: abhilashnair
5 Replies