On 22/11/10 18:05, Tim wrote:

I am a cli dunce so please bear with me.

Lets say I am working in the terminal screen in the following folder

m...@computer:~#/folder1/folder2/folder3/folder4/folder5 mv blah blah.........

Now I want to go back to work in folder2, what the easy command to get me back
there??

I have to move a lot of files (1 and 2) between a lot of folders and retyping
the full path everytime is wearing my keyboard out!!


Assuming you are using bash shell, add a function to move to the directory you want in an easy command like cd1

Edit .bash_profile

$ cd
$ vi .bash_profile

Add


function cd1() {
        cd /tmp;pwd     
}

Save and exit

$ source .bash_profile

Now you can use

cd1

to get you to /tmp or whatever folder/path you want. Add as many functions as you need.



--
--------------------------------------------------------------
Discover Linux - Open Source Solutions to Business and Schools
http://discoverlinux.co.uk
--------------------------------------------------------------

--
Next meeting:  Somewhere quiet, Bournemouth, ???day 2010-12-?? 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue

Reply via email to