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
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
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. Shell Programming and Scripting
I need to make a shell script that accepts a directory input by the user. The program searches for the directory and finds if it exists or not. Then if it does exist, it outputs the number of files within that directory. Here's what I have so far.
result=
echo "Please input a directory:... (5 Replies)
Discussion started by: itech4814
5 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. 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
9. UNIX for Advanced & Expert Users
Hi
I have some 5 folders and two files in the current directory.
I want to delete all, expect one folder(files in the folder too should not be deleted) and a file in the current directory. Lets say the folder and file that should not be deleted as 'a'(folder name) and 'b'(file name). Can you... (1 Reply)
Discussion started by: ammu
1 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