![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copying files from one directory into another. | Krush187 | Shell Programming and Scripting | 4 | 04-07-2009 10:32 AM |
| Synchronization in copying multiple files to a directory | amio | Shell Programming and Scripting | 1 | 03-12-2009 08:32 AM |
| Help with cron: copying all files in a directory to another... | ashleyquick | UNIX for Dummies Questions & Answers | 1 | 12-10-2008 07:31 PM |
| Using cp -r command to selectively omit *.dat files while copying a directory. | d_sai_kumar | UNIX for Dummies Questions & Answers | 5 | 07-18-2008 06:48 AM |
| Copying files from one directory to Other | satishkeshetty | UNIX for Dummies Questions & Answers | 3 | 04-14-2008 08:08 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Copying files to a directory
Hi I have a few questions. I am trying to copy a file to a directory. I need to copy files that do not end in numbers, for example, into a directory. This is what I tried so far. cp filename[!1-9] directorytowhereIwannacopy but it says it can't copy to a directory. I need to copy many files into one directory.
My other question is how do you get back to the directory you changed from? You changed into a directory but how do you go back from it? Finally, is there a way you can write a string into many files using just one single command? Thanks in advance. |
|
||||
|
Quote:
Code:
ls -l|awk '/^-/ && !/[0-9]$/{system("cp "$8" /dest/dir")}'
Quote:
Code:
cd - Regards |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|