Expert cp command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Expert cp command
# 8  
Old 03-29-2010
Try...
Code:
find . -type f -name '*test*' -exec mv {} <dest> \;

# 9  
Old 03-29-2010
Code:
find . -type f -name '*est*' -exec mv {} filezip \;
find: incomplete statement

after
Code:
find . -name "*est*" -exec mv {} filezip \;
mv: ./filezip/teste.sh and filezip/teste.sh are identical
mv: ./filezip/test and filezip/test are identical

and did not copy
./bound/3654687est254687.txt
./feed/4444444est254687.txt
but I discovered some things, my folders bound and feed are aliases. I created real folders and worked well.
So I tried to copy using this
Code:
find . -name "/d1/clarisdata/InBound/*est*" -exec mv {} filezip \;

but did not copy the files.
# 10  
Old 03-29-2010
Sorry, i wrote as mv instead of cp in the previous post...
And the below is working fine with me on AIX...

Code:
find . -name "*est*" -exec cp {} /absolute/path/to/dest/ \;

# 11  
Old 03-29-2010
But my files "*est*" are in diferent path that my user is, so i tried

Code:
find . -name "/d1/clarisdata/InBound/*est*" -exec cp {} filezip \;

and did not copy.
My user is /home/claris/ and I want to copy the files from /d1/clarisdata/InBound/*est* to /home/claris/filezip/ and the command does not find my files...
# 12  
Old 03-29-2010
Try this...

Code:
find /d1/clarisdata/InBound/ -name "*est*" -exec cp {} /home/claris/filezip/ \;

# 13  
Old 03-29-2010
Yeah brother!!! thanks man!

This worked. if you have some good tutorial about unix at the internet do tou can send the link, please.

Thanks a lot, now my script will bi very good!
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to expert Shell Programming ?

Guys, I have been reading the bash books, there are so many command & operators etc. The theory part is so much. Overall I have read some book. Still do not feel I know the bash with confidence. Lots of Jobs for System Admin demand Scripting knowledge as requirement .. I think I should... (7 Replies)
Discussion started by: heman96
7 Replies

2. Solaris

Becoming a Solaris expert?

Hello everyone, how do you really study to become an expert in solaris OS? Thanks (3 Replies)
Discussion started by: cjashu
3 Replies

3. Solaris

Could not able to delete the files through find command need expert advice

Hi Gurus I am facing a problem, there is a folder called /a where there are lots of files which are occupying space anything between 30 GB to 100 GB as I am not able to check the space occupied by that folder through "du -sh /a" command as I don't see any output after more than 1 hour of... (4 Replies)
Discussion started by: amity
4 Replies

4. UNIX for Advanced & Expert Users

Expert Opinion

This perhaps does not belong in ths category; apologies, however, we have a heated debate going and your input will decide the result. Should UNIX (HP, AIX, etc) be rebooted following a monthly cycle (Every month, or a qtr, etc.). We have some UX admins (grumps) who say they have seen a UX... (6 Replies)
Discussion started by: rsheikh
6 Replies

5. Programming

Perl and Expert Systems

Hi, I'm designing / writing a system which would analyze results of a load test and determine whether test passed or failed. The trouble is, the pass/fail criteria is very complex. And it may vary. So I'm thinking of something similar to Expert Systems. One idea is put the rules in XML... (3 Replies)
Discussion started by: Yogesh Sawant
3 Replies

6. Solaris

expert vi commands

:) Hi UNIX friends, Where do I get advanced vi commands to practice. Please Help Me. Love (4 Replies)
Discussion started by: Love
4 Replies

7. Linux

I am a beginner.Wanna become expert.

Hi Everybody, I am beginner to Unix platform, Can anybody guide me to learn the Unix, Scripting, shell scripting and inside stuff. I am interesting in programming that needs the step by step walk. Thankful to those who dare to walk along. yours farooq (5 Replies)
Discussion started by: farooq_kdp
5 Replies
Login or Register to Ask a Question