Copying file while adding preffix
Hi, Someone can suggest me how to recursively copy files from a given directory while adding preffix to the copies in destination dir? Thanks in advance for any suggestion(s). Andrei
Andrei, On Thursday 23 June 2005 13:44, Andrei Verovski (aka MacGuru) wrote:
Hi,
Someone can suggest me how to recursively copy files from a given directory while adding preffix to the copies in destination dir?
Thanks in advance for any suggestion(s).
Krename has this ability. Check it out.
Andrei
Randall Schulz
On Thursday 23 June 2005 21:44, Andrei Verovski (aka MacGuru) wrote:
Someone can suggest me how to recursively copy files from a given directory while adding preffix to the copies in destination dir?
mcp might work. In this package on my 9.2 system: mmv-1.01b-793 man mcp to see how it works. -- Bill
Andrei Verovski (aka MacGuru) wrote:
Hi,
Someone can suggest me how to recursively copy files from a given directory while adding preffix to the copies in destination dir?
Thanks in advance for any suggestion(s).
Andrei
How about: for i in `ls`; do cp $i /some/directory/prefix.$i; done Tom Wekell
On Friday 24 June 2005 18:18, Tom Wekell wrote:
Andrei Verovski (aka MacGuru) wrote:
Hi,
Someone can suggest me how to recursively copy files from a given directory while adding preffix to the copies in destination dir?
Thanks in advance for any suggestion(s).
Andrei
How about: for i in `ls`; do cp $i /some/directory/prefix.$i; done
ls -A or else will list . and ..
On Fri, 2005-06-24 at 18:39 +0300, Silviu Marin-Caea wrote:
On Friday 24 June 2005 18:18, Tom Wekell wrote:
Andrei Verovski (aka MacGuru) wrote:
Hi,
Someone can suggest me how to recursively copy files from a given directory while adding preffix to the copies in destination dir?
Thanks in advance for any suggestion(s).
Andrei
How about: for i in `ls`; do cp $i /some/directory/prefix.$i; done
ls -A or else will list . and ..
Must be broken in 9.3 as it still shows the . and .. files on my system. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
* Ken Schneider <suse-list@bout-tyme.net> [06-24-05 11:54]:
On Fri, 2005-06-24 at 18:39 +0300, Silviu Marin-Caea wrote: ...
ls -A or else will list . and ..
Must be broken in 9.3 as it still shows the . and .. files on my system.
And what does "echo $LS_OPTIONS" provide that may alter ls's output and/or "alias ls" for the same reason. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery
On Fri, 2005-06-24 at 12:23 -0500, Patrick Shanahan wrote:
* Ken Schneider <suse-list@bout-tyme.net> [06-24-05 11:54]:
On Fri, 2005-06-24 at 18:39 +0300, Silviu Marin-Caea wrote: ...
ls -A or else will list . and ..
Must be broken in 9.3 as it still shows the . and .. files on my system.
And what does "echo $LS_OPTIONS" provide that may alter ls's output and/or "alias ls" for the same reason.
echo $LS_OPTIONS -N --color=tty -T 0 alias ls='/bin/ls $LS_OPTIONS' I did an unalias ls and now works as expected. None of the options that were set should have had an effect on the output though. Thanks for the info as I didn't expect any alias for the ls command, the ones related yes, but not ls. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
* Ken Schneider <suse-list@bout-tyme.net> [06-24-05 12:39]: ...
echo $LS_OPTIONS -N --color=tty -T 0
alias ls='/bin/ls $LS_OPTIONS'
I did an unalias ls and now works as expected. None of the options that were set should have had an effect on the output though. Thanks for the info as I didn't expect any alias for the ls command, the ones related yes, but not ls.
Something else has it head stuck in there, then. My output from a bare 'ls' does *not* include ., .., or any of the .xxx files. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery
Anders, On Friday 24 June 2005 12:03, Anders Johansson wrote:
On Friday 24 June 2005 18:40, Ken Schneider wrote:
Must be broken in 9.3 as it still shows the . and .. files on my system.
Are you saying
ls -A | grep "\.\."
actually produces output on your system?
Then yes, it is broken
That's only true if the command is: env - /bin/ls -A |grep "^\.\.$" Otherwise and alias, shell procedure or intervening script could alter the options passed. Secondly, "ls" responds to some environment variables. Lastly, the unanchored grep command you specified would include a file such as "..foo" or "foo..bar". Randall Schulz
participants (8)
-
Anders Johansson
-
Andrei Verovski (aka MacGuru)
-
Ken Schneider
-
Patrick Shanahan
-
Randall R Schulz
-
Silviu Marin-Caea
-
Tom Wekell
-
William Gallafent