[Users] Moving files

Little Girl littlergirl at gmail.com
Wed Jan 4 19:53:30 CET 2012


Hey there,

Charles Curley wrote:
> Owen wrote:
> 
> > My guess is that there are no long file names,
> 
> Not so.
> 
> To find out which files need changing and where, something like:
> 
> find -type f | xargs grep '/home/foo' | grep -v '.bak'
> 
> > and therefore the
> > simplest solution would be to;
> > 
> > 1. Copy over /home/foo/.claws-mail/ to /home/bar/.claws-mail
> > 2. Copy over /home/foo/Mail to /home/bar/Mail
> > 3. Change any username specific entries in your new configuration 
> > (these entries are normally related to your isp account and
> > probably don't need changing)
> > 4. depending on how you do the copy, you may have change
> > ownership of the transferred files.
> 
> 5. Run the above and variants on it and edit as needed.
> 
> You could also work something out with sed to save the editing.

I'll jump in with these from my trusty arsenal:

FIND THEM:

grep -r foo *

CHANGE THEM ONE BY ONE:

sed -i 's/foo/bar/g' /PATH/TO/FILE

-- 
Little Girl

There is no spoon.



More information about the Users mailing list