-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Julian,
On Sat, 27 Sep 2003 03:49:26 +0100, julian <[EMAIL PROTECTED]> wrote about Re: [newbie] Very basic bash question: >> Often I am in /home/dvg/foo and want to move files from /home/dvg/foo/bar >> to ~/foo. I can`t find a command shortcut to do this. Until now I have >> had to work around by: >> cd bar >> mv file* .. >> s (=alias for cd ..) >argh, test worked ... didn't think it would. > >Anyway: >mv ~/foo/bar/file ~/foo >-should work from any directory. Clear. >If you were in foo you could use: >mv bar/file . Many thanks! That`s exactly what I was looking for. >- not /bar/file though as this would point to a directory called bar under >/- the . stands for the current directory. Sorry: the first `/` was a typo. >If you are moving files all the time you could do: >export foobar=~/foo/bar >- this sets the variable foobar to hold the path to save having to type it. >from then on you could use: >mv $foobar/file $foobar/.. This is also clear, but I don`t think I`ll be needing that much; see below. >If you wanted to you could edit ~/.bash_profile so that the variable foobar >is set when you start bash. add the following: >foobar=~/foo/bar >export foobar I use the `move from subdir to dir` in many different places - as they arise - - so indeed I could, but would have to set too many variables to be practical. >I'm reading through this basic stuff at the moment. You must be paying better attention than I. Thanks for your answer. Ciao, =Dick Gevers= .----> Mandrake visibility? See headers... <----. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Encryption is an envelope - the contents are private. iD8DBQE/dQyEwC/zk+cxEdMRAmfMAJ4sfFxwXW7bXqummRVfoKhuC511GwCglWUA ENIDWRhwLeSnQNFIYPXdDzE= =in8G -----END PGP SIGNATURE-----
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com