![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| copying files | tjay83 | Shell Programming and Scripting | 4 | 08-25-2008 08:52 AM |
| Error Message while copying- Pls Help | geeyess123 | UNIX for Advanced & Expert Users | 1 | 08-11-2008 06:47 AM |
| Copying Files and | patilmukundraj | SUN Solaris | 1 | 12-30-2007 12:04 PM |
| Copying files in AWK | koti_rama | Shell Programming and Scripting | 4 | 08-01-2007 09:55 PM |
| Copying files | alpheusm | UNIX for Dummies Questions & Answers | 4 | 10-17-2002 10:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
getting error while copying files
I am trying copy all files ,i was getting below error .Please any idea
#find . -name "*bat" -exec cp -p {} /devt/jobs find: incomplete statement Thanks, Akil |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
You are missing a ";" in the statement. Here is another example of find and exec together.
Code:
find /usr/include -type f -exec grep NFS_VERSION {} \; -print
Also, instead of using this command, I would suggest you to use find| xargs command. Following is the example. Code:
find /usr/include -type f|xargs grep NFS_VERSION |
|
#3
|
|||
|
|||
|
Hi
I want to copy files from home to /devt/jobs and just want to check with u on the below one find /usr/include -type f|xargs grep NFS_VERSION--This is destination folder Thanks, Akil |
|
#4
|
|||
|
|||
|
I tried with this command, and works like a charm..
Code:
find <start directory> -iname "<all my files type>" -exec cp {} <target_dir> \;
|
|
#5
|
|||
|
|||
|
Hi
Thanks its working fine.I want to replace control m charactres current dir and all subdirectories as well.Please help Thanks, Akil |
|
#6
|
|||
|
|||
|
Following are the solutions for this :
Code:
sed 's/^M//g' ${INPUT_FILE} > tmp.txt
mv tmp.txt ${INPUT_FILE}
tr -d "\15" < ${INPUT_FILE} > tmp.txt;
mv tmp.txt ${INPUT_FILE}
for file in $(find /path/to/dir -type f); do
tr -d '\r' <$file >temp.$$ && mv temp.$$ $file
done
|
|
#7
|
|||
|
|||
|
Hi
Thanks ,its working fine Thanks, Akil |
|||
| Google The UNIX and Linux Forums |