10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I hope somebody would be able to help me.
I would need to search a string coming from a file, example file.txt:
dog
cat
goat
horse
fish
For every string, I would need to know if there are any files inside a directory(recursively) that contains the string regardless of case.... (9 Replies)
Discussion started by: kokoro
9 Replies
2. Shell Programming and Scripting
Hello,
I supposed that it was working fine but now I see that it's not working as expected.
I am running under ubuntu14.04, trusty.
My plan was to search folderA and all subdirectories and move any txt file to destination folder, folderB :
find /home/user/folderA/ -type f -iname "*.txt"... (0 Replies)
Discussion started by: baris35
0 Replies
3. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
4. Shell Programming and Scripting
Hi.
I found many scripts in the web of achieving this.
But I like to use this one
find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst
But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command?
My... (7 Replies)
Discussion started by: aimy
7 Replies
5. Shell Programming and Scripting
Hello ALL,
need a BASH script who find file and send email with attachment.
I have 50 folders without sub directories in each generated files of different sizes but with a similar name Rp01.txt Rp02.txt Rp03.txt ...etc. Each directors bound by mail group, I need a script that goes as... (1 Reply)
Discussion started by: penchev
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a directory which contains multiple files with .txt extension, i want to rename all these file to .bak extension using find command, this is what i've tried, please help me to correct this :
find /home/application/test -name '*.txt' -exec rename 's/txt/bak/' {} \;
seems to... (8 Replies)
Discussion started by: mukulverma2408
8 Replies
7. Shell Programming and Scripting
Hello :
I need some help in writing a ksh script which will find a particular directory in all the file systems in a server and finally report the total size of the direcotry in all the file systems.
Some thing like this..
find /u*/app/oracle -type d -name "product" -prune
and then... (1 Reply)
Discussion started by: Sam1974
1 Replies
8. Shell Programming and Scripting
Pls. advise how to find or used grep recursively all shell script files.
Some files doesnt have a .sh or .ksh extension name.
find / -name "*" |xargs grep bin |grep sh
??
TIA (1 Reply)
Discussion started by: budz26
1 Replies
9. UNIX for Dummies Questions & Answers
I would need a command for finding first 15000 of the file names whose 25th postion is 5 in the current directory alone.
I do have this painful command
find . -name '5*' | head -15000 | cut -c3-
please refine this.
Of course the above command also searches in the sub directories... (3 Replies)
Discussion started by: vk39221
3 Replies
10. Shell Programming and Scripting
How can I pass $var_find variable as argment to find command?
test.sh
var_find=' \( -name "*.xml" -o -name "*.jsp" \) '
echo "${var_find}"
find . -type f ${var_find} -print
# Below statement works fine.. I want to replace this with the above..
#find . \( -name "*.xml" -o -name... (4 Replies)
Discussion started by: kchinnam
4 Replies