Use the rename script this way: $ rename 's/^/PRE_/' * There are no problems with metacharacters or whitespace in filenames.
Some systems have a util-linux utility called "rename" which works differently (on Ubuntu it's called "rename. Ul"). – Dennis Williamson Jan 24 at 23:07 rename has always helped me handle multiple file renames very easily.
– Alan Haggai Alavi Feb 12 at 17:17.
In bash: for f in `ls` ; do mv $f PRE_$f ; done Edit: And thanks to Peter van der Heijden, here's one that'll work for filenames with spaces in them: for f in * ; do mv "$f" "PRE_$f" ; done.
1 beware of filenames with spaces in them... – Alnitak Jan 24 at 21:35 Heh, true, this will completely not work if you have a file with a space in it. – CanSpice Jan 24 at 21:37 3 If you change the ls command to * and put double quotes around the arguments to mv, it will work for files containing spaces. – Peter van der Heijden Jan 24 at 21:45.
With Perl: perl -e 'rename $_, "PRE_$_" for.
If you have Ruby(1.9+) ruby -e 'Dir"*". Each{|x| File. Rename(x,"PRE_"+x) }.
Here is a simple script that you can use. I like using the non-standard module File::chdir to handle managing cd operations, so to use this script as-is you will need to install it (sudo cpan File::chdir). #!
/usr/bin/perl use strict; use warnings; use File::Copy; use File::chdir; # allows cd-ing by use of $CWD, much easier but needs CPAN module die "Usage: $0 dir prefix" unless (@ARGV >= 2); my ($dir, $pre) = @ARGV; opendir(my $dir_handle, $dir) or die "Cannot open directory $dir"; my @files = readdir($dir_handle); close($dir_handle); $CWD = $dir; # cd to the directory, needs File::chdir foreach my $file (@files) { next if ($file =~ /^\. +$/); # avoid folders . And .. next if ($0 =~ /$file/); # avoid moving this script if it is in the directory move($file, $pre .
$file) or warn "Cannot rename file $file: $! "; }.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.