9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can you please help tweak the below command to exclude all directories with the name "logs" and "tmp"
find . -type f \( ! -name "*.tar*" ! -name "*.bkp*" \) -exec /usr/xpg4/bin/grep -i "user_1" /dev/null {} + >result.out
bash-3.2$ uname -a
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v... (9 Replies)
Discussion started by: mohtashims
9 Replies
2. Red Hat
Hi Folks,
I want to run the below command and to exclude the specific path like /var/test/support/... . How to achieve using the below command
find / -type f \( –perm –4000 –o –perm –2000 \) –print
-Siva
Please do not use FONT tags inside CODE tags. And, there is usually no reason to... (2 Replies)
Discussion started by: gsiva
2 Replies
3. Shell Programming and Scripting
How can i tweak the below find command to exclude directory/s -> "/tmp/logs"
find . -type f \( ! -name "*.log*" ! -name "*.jar*" \) -printNote: -path option/argument does not work with the version of find that i have.
bash-3.2$ uname -a
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v (7 Replies)
Discussion started by: mohtashims
7 Replies
4. Shell Programming and Scripting
Gentleman and Ladies,
I am having some difficulty in regards to the find utility. I am trying to not traverse nfs mounts when searching for files or directories.
This command does not seem to work. It still returns directories that live on nfs shares. The man page says:
-fstype type... (6 Replies)
Discussion started by: jaysunn
6 Replies
5. UNIX for Dummies Questions & Answers
The below 'ls' command will list down files with extensions and suppress the ones with no extension
ls |grep "\\." But this dosen't work when I apply the same logic using 'find' command
find . -type f |grep "\\." I need help on how this logic can be implemented using 'find' command (3 Replies)
Discussion started by: meenavin
3 Replies
6. Shell Programming and Scripting
Hi All,
First my OS version is:
ksh:0$ uname -a
SunOS 5.9 Generic_122300-48 sun4u sparc SUNW,Sun-Fire-V440
I want to exclude the following DIR(./country111) in my search pattern:
ksh:0$ find . -name "*.tar"
./country111/COUNTRY_BATCH-801.tar
./country111/COUNTRY_BATCH-802.tar... (3 Replies)
Discussion started by: saps19
3 Replies
7. 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
8. Shell Programming and Scripting
Hi Forum.
I'm trying to write a script that finds and deletes files that are older than 300 days. The script will read a table that contains the following 3 columns:
1st col: “Y” means sub-directory scan; "N" means no subdirectory scan
2nd col: sub-directory location
3rd col: File prefix... (7 Replies)
Discussion started by: pchang
7 Replies
9. UNIX for Dummies Questions & Answers
Howdy
I have this directory structure ...
eep
eepaptest
eepfatest
eepgltest
eep.old
eeppoptest
ehf
ehfaptest
ehfgltest
ehp
ehpgltest
I want to find files in these directories, but I want to exclude eep, ehf & ehp.
Cany anyone help with the correct command ?? (1 Reply)
Discussion started by: SmurfGGM
1 Replies