[PLUG] what simple linux command does this?
Michael Rasmussen
michael at jamhome.us
Thu Sep 30 00:17:02 UTC 2010
On Wed, Sep 29, 2010 at 04:51:24PM -0700, glen e. p. ropella wrote:
> logical american wrote circa 10-09-29 04:38 PM:
> > This is a "noobie" linux question.
> >
> > I cannot seem to find a simple linux command to do the following:
> >
> > mv /one/long/path/on/a/partition/file
> > /another/path/on/another/partition/file
> > [...]
> > Isn't there an easy way to do this?
>
> How about:
>
> $ mkdir -p /another/path/on/another/partition/
> $ mv /one/long/path/on/a/partition/file /another/path/on/another/partition/
I'm more of a fan of:
$ mkdir -p /another/path/on/another/partition/ && mv /one/long/path/on/a/partition/file !!$
The && just to be sure you're only doing it if the mkdir works
the !!$ to lessen my propensity for typos.
See `man bash` for History Expansion for the !!$ magic
--
Michael Rasmussen, Portland Oregon
Trading kilograms for kilometers since 2003
Be appropriate && Follow your curiosity
http://www.jamhome.us/
The Fortune Cookie Fortune today is:
You're not a DNF until the time arrives and you haven't.
More information about the PLUG
mailing list