10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need to delete all files from the working directory and its sub directories using the find command, for that I am using -prune option but some how I am having a syntax issue.
I have tried the below, please help me correct the syntax
find . -name \* -type f -exec rm -f {} \; >> Works but... (4 Replies)
Discussion started by: rosebud123
4 Replies
2. Shell Programming and Scripting
Can you please figure out what is the issue here
$ find . -maxdepth 1 -type f -size 0 -print
find: bad option -maxdepth
please find the OS details
$ uname -a
HP-UX g5u1216 B.11.31 U ia64 2614088426 unlimited-user license
Use code tags, thanks. (6 Replies)
Discussion started by: TomG
6 Replies
3. Shell Programming and Scripting
Hi,
I am not able to get output for find command if there are variables defined inside -name option .
Please check below example
1)
###VARIABLES DEFINED
process="fast"
temperature="125c"
voltage="0p935v"
2) I don't get output for below find command
find -L <PATH> -type f \( -name... (2 Replies)
Discussion started by: gujrathinr
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to find some files in a directory and then remove/list them if they are 30 days old. I also have 2 directories in that directory which I need to skip. Can someone please tell me what is the correct syntax?
find /developer/. -name "lost+found" "projects" -prune -o -type f... (2 Replies)
Discussion started by: tkhan9
2 Replies
5. Shell Programming and Scripting
Hi All,
Could you please help me in searching files in a better way satisfying the below conditions
I want to search files in a path whose access time is more than 5min and less than 60 min and whose Byte size is greater than zero
For this, i am using the below command, but it is... (2 Replies)
Discussion started by: sparks
2 Replies
6. Shell Programming and Scripting
Hi all,
In a directory, I have many video files. Example :
As you can see, some of the video files come with a .aspx file (wich
means the video is actually being uploaded and not entirely written on
the FS)
I try to write a bash script that would find all video files in the
... (1 Reply)
Discussion started by: gniagnia
1 Replies
7. Shell Programming and Scripting
Hi,
I am trying to list all the files created / modified today in a directory.
With reference to this thread,
https://www.unix.com/shell-programming-scripting/20324-capture-all-today-files.html
I have used the below command to list all the files modified today.
find . -daystart -type f... (8 Replies)
Discussion started by: arunkumarmc
8 Replies
8. Shell Programming and Scripting
Hi
I have a directory say mydir and inside it there are many files and subdirectories and also a directory called lost+found owned by root user
I want to print all files directories and subdirectorres from my directory using find command except lost+found
If i do
find . \( -name... (3 Replies)
Discussion started by: xiamin
3 Replies
9. UNIX for Dummies Questions & Answers
Hi , Kindly help me out .:)
i want to find only the file t4 in directory t3. i am in dir t . the tree is as follows.
if i give,
find .
o/p is
.
./t4
./t1
./t1/t2
./t1/t2/t3
./t1/t2/t3/t4
./t1/t2/t4
./t1/t4
directories are like t/t1/t2/t3 and each directory has file t4.
my... (7 Replies)
Discussion started by: bhuvaneshlal
7 Replies
10. Shell Programming and Scripting
I need to check if a file has been modified within the last x hours. My find command does not have the mmin option -- only the mtime option which is in 24 hour perriods (1 Reply)
Discussion started by: Bill Ma
1 Replies