What you're attempting is not possible because when there are more than 2 arguments cp treats the last as a directory.
Regards,
Alister
Exactly... what I thought in first place, but as the cp test{,.bak} is one argument came to my mind that idea... nevertheless im on the journey to find something similar.. thinking in doing "for i in blablabla" .... but no.
works in bash, ksh, zsh (and in csh)
works in bash and zsh only.
But the combination
does the {,} expansion only.
In your cp example the last argument must be a destination directory. (There are a few old cp versions that really copy all files to a destination file.)
This User Gave Thanks to MadeInGermany For This Post:
good morning friends
I have a problem
, I have a file with 2 million records, but that can be variable, I need to split that file and drop several files in 500,000 thousand records, someone can help me with some unix shell code
thank you!!! (7 Replies)
Hi,
Is there a direct command or need to write a shell script for following requirement?
Everyday a folder is populated with approx 25k to 30k xml files. I need to create multiple zip files in the same folder each containing 50 xml files. The last zip file may or may not contain 50 xml files.... (6 Replies)
I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also?
I found one command which is to create gz file for the... (4 Replies)
HI,
I would like to create the files as
file1.txt
file2.txt
file3.txt
......
.......
.......
filen.txt
in a single unix command, i dont want to use the loops.
n is user specific
Kindly help me in this.
THank you
Jagadeesh (2 Replies)
Requirement:-
SQLs
select name from v$datafile;
select name from v$controlfile;
select name from v$tempfile;
select MEMBER from v$logfile;
These sqls has to run in one script and o/p of each sql has to write in seperate files.But the o/p is like if we issue
select name from... (2 Replies)
Hello
I have a ton of files in a directory of the format app.log.2008-04-04
I'd like to run a command that would archive each of these files as app.log.2008-04-04.tgz
I tried a few combinations of find with xargs etc but no luck.
Thanks
Amit (4 Replies)
hi guys! i want my user to create some new files in a directory:
i would like the user to choose a file name and then to create some kind of user friendly utility that makes my user write what he/she wants in the file and then save it in the chosen directory.
let's say that in my programme i... (2 Replies)