You are not logged in.
The rename command in bash on my ubuntu box allows for Perl regular expressions for mass renaming of files:
Synopsis:
rename perlexpr [ files ]
The rename command in Arch bash is a more simple one:
Synopsis:
rename from to [ files ]
Is it possible to get the ubuntu version of 'rename' for arch ??
Offline
cat > ~/bin/rename #or sudo tee `which rename` (not recommended)
#!/usr/bin/perl
$op = shift or die "Usage: rename expr [files]\n";
chomp(@ARGV = <STDIN>) unless @ARGV;
for (@ARGV) {
$was = $_;
eval $op;
die $@ if $@;
rename($was, $_) unless $was eq $_;
}
then make sure that you have $HOME/bin first in your PATH.
Offline
ls | egrep 'regex' | xargs -I {} cp {} new/path/
Offline
Is it possible to get the ubuntu version of 'rename' for arch ??
Yup, it is now available in the AUR.
For further information on the topic, you might want to look at this thread.
The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.
Offline