Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] Need a tool like mmv, but to generate sequential names
  • From: Aaron Kulkis <akulkis01@xxxxxxxxx>
  • Date: Mon, 03 Mar 2008 20:23:57 -0500
  • Message-id: <47CCA4AD.4010008@xxxxxxxxx>
Greg Freemyer wrote:
On Mon, Mar 3, 2008 at 7:29 PM, Aaron Kulkis <akulkis01@xxxxxxxxx> wrote:
Greg Freemyer wrote:
> All,
>
> I have a directory with several hundred files in it. All in
> alphabetical order the way I need them.
>
> I need to rename them to be in a totally different sequence.
>
> ie.
> Currently nnn_mmm_lll.tif
>
> Need to rename AAA_xxxx.tif where AAA is fixed, and xxxx is sequence
> I can specify the starting point for.
>
> I'm about to write a shell script to do this, but would be nice to
> have a pre-existing tool I could call on. mmv is close I think, but I
> don't know how to do the sequence number with it.

Instead of using mv or mmv, I would us ln -s

Otherwise, you might be wishing you still had the original names.


mmv with the -c option makes copies.

Copy = 2x disk space storage...and modifications only being done
to one or the other.

Linking means 1 disk block (or in some filesystems, part of a block)
additional disk space for the link


> And you can go from a source dir
to a dest dir.

You can do the same thing with ln -s


For example, I keep all of my plugins for web browsers in
one directory: /opt/browser.plugins

cd /opt/seamonkey1.1.8/plugins
for f in /opt/browser.plugins/*
do
ln -s $f .
done

I do similar things for opera and konqueror.



That's how I normally do it.

Anyway, I have a working bash script now. I guess I can post it to
the list if there is not a simpler solution.

Greg




--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References