10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
hi,
Need your help.
I need to write a script for below..
i have two files in directory /home/abc as below:
Watch_20140203_abc.dat
Watchnow_20140203_abc.dat
I have to copy this file from
/home/abc to /home01/home02
after that i have to rename the date part in above two files... (1 Reply)
Discussion started by: Vivekit82
1 Replies
4. Shell Programming and Scripting
Hi,
Need your help in this.
I have an input file that has multiple enrollment_number, somewhat like
1234567
8901234
9856321
6732187
7623465
Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Discussion started by: mukulverma2408
10 Replies
5. Shell Programming and Scripting
I want to find a file say IIFT and check its size is zero or not. If its zero then I have to rename anothe file say WWFT , which is in another folder to WWFT$Todaysdate.
I tried below command:
cd dir2 (*File WWFT is in dir2)
find dir/ -type f -name 'IIFT*' -size 0 -exec mv WWFT... (3 Replies)
Discussion started by: ammbhhar
3 Replies
6. Shell Programming and Scripting
I have this directory tree under /apps/myapp/data:
imageshack.us/photo/my-images/703/foldersc.png
How to recursively rename ONLY directories with 5 digits (00000, 00100, 00200,..., 00007, 00107,...)?
I want to add to their name two more zeros:
Before: 00107
After: 0000107
Thanks in... (2 Replies)
Discussion started by: Susan_45
2 Replies
7. Shell Programming and Scripting
Hello,
I have one directory with 3 level sub-directories, and about houndard files under those directories. I need a shell script to rename all patern mateched directories and files.
For example: the patern is AA in the directory or file name.
Orignal directory:... (2 Replies)
Discussion started by: mail4mz
2 Replies
8. Shell Programming and Scripting
I need help finding a file through terminal and then renaming it automatically.
Here is what I have so far to find the file:
cd /User/Applications
find . */SourceM.app/banner.png | while read line; do mv "$line" banner-.png; done
I want the script to rename the file "banner.png" to... (6 Replies)
Discussion started by: rbisconti97
6 Replies
9. Shell Programming and Scripting
hi
I have files named
123_234_aaa.jpg
234_231_345.jpg
and i wish to rename these files to
aaa.jpg and 345.jpg. i.e inital number,_,next number should be removed form the file name. Please let me know how can i do it. (2 Replies)
Discussion started by: vasuarjula
2 Replies
10. UNIX for Dummies Questions & Answers
I would like to replace multiple underscores with hyphens but I have 26,000 files to rename. They are all in one file structure and multiple sub-directories.
It would be much simpler if I had a script to do it. Here are some samples of the file names:
Example 1... (3 Replies)
Discussion started by: ..Chris..
3 Replies