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 All,
I have a folder name lets say path/to/folder/CUSTOMER and under this i have several folders and each of these subfolder have serveral subfolders and so on and at some point i will have a folder name called "FTP_FILES" .
I need to search for these folders named "FTP_FILES and then... (10 Replies)
Discussion started by: Kevin Tivoli
10 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. Shell Programming and Scripting
Hi All,
I was exploring find command and came across -prune option which would exclude search in a mention subdirectory.
My quesry is to search all files more that 100 MB size but exclude search in a subdirectory.
I am using below command,but somehow it is not working.
Can anybody help me... (6 Replies)
Discussion started by: usha rao
6 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. 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
10. Shell Programming and Scripting
Hello my friends,
I need to write a simple shell bad file :D that search and delete a file it's name 'Microsoft.txt' in the current directory and its subdirectories?
So can you help to guide me how i can write this shell, Just give me the beginning :o thank you. (1 Reply)
Discussion started by: Net-Man
1 Replies