Re: [Dorset] cd question

2010-11-25 Thread Ralph Corderoy
Hi Martin, Bash regular expressions can come in handy when moving lots (but not all) files. For example mv DSCF0[4-6]*.jpg will move everything between DSCF04... to DSCF06... with one statement. Strictly speaking those are not regular expressions. Their historic name is glob patterns,

Re: [Dorset] cd question

2010-11-25 Thread Tim Allen
Hi On 25/11/10 14:14, Ralph Corderoy wrote: Are you aware of the shell's filename completion with the Tab key? After typing cd /fo Apologies if already mentioned, but the key sequence I probably use most in bash is crtl-r followed by some part of a previously entered command. Bash

Re: [Dorset] cd question

2010-11-23 Thread Peter Merchant
On Mon, 2010-11-22 at 22:51 +, Victor Churchill wrote: On 22 November 2010 20:56, Peter Merchant madsmad...@netscape.net wrote: And my wife complains that under MS Windows there are so many ways to do things and why couldn't they just have one way to do it. I am lazy. From the

Re: [Dorset] cd question

2010-11-23 Thread Chris Dennis
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

Re: [Dorset] cd question

2010-11-23 Thread Andrew R Paterson
On Monday 22 November 2010, Peter Merchant wrote: On Mon, 2010-11-22 at 19:30 +, John Carlyle-Clarke wrote: 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

Re: [Dorset] cd question

2010-11-23 Thread Andrew R Paterson
On Tuesday 23 November 2010, Peter Merchant wrote: On Mon, 2010-11-22 at 22:51 +, Victor Churchill wrote: On 22 November 2010 20:56, Peter Merchant madsmad...@netscape.net wrote: And my wife complains that under MS Windows there are so many ways to do things and why couldn't they just

[Dorset] cd question

2010-11-22 Thread Tim
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

Re: [Dorset] cd question

2010-11-22 Thread StarLion
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?? Assuming you're working in folder5 in your example, running 'cd ..' will go back to folder4. To go down two levels, you want

Re: [Dorset] cd question

2010-11-22 Thread Victor Churchill
Hi Tim, you can use '..' to tell cd to go one folder up from where you are currently in the folder hierarchy. So if you are at /home/tim/folder1/folder2/folder3/folder4/folder5 , then $ cd .. will put you into folder4 $ cd ../.. will put you into folder3 $ cd ../../.. will put you into folder2

Re: [Dorset] cd question

2010-11-22 Thread Simon P Smith
On 22/11/2010 18:16, StarLion wrote: 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?? Assuming you're working in folder5 in your example, running 'cd ..' will go back to

Re: [Dorset] cd question

2010-11-22 Thread Sean Gibbins
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

Re: [Dorset] cd question

2010-11-22 Thread Martin Settle
Judicious use of symbolic links and bash regular expressions can also make short work of this. If you do cd ~/folder1/folder2/folder3/folder4/folder5 ln -s ../../.. folder2 you will have a folder under folder5 called folder2 which points to your original folder2 directory You can then simply mv

Re: [Dorset] cd question

2010-11-22 Thread John Carlyle-Clarke
Sheesh! Seconds after posting, I spot my deliberate mistakes... On 22/11/10 19:30, John Carlyle-Clarke wrote: That's a bit odd looking, but command gets executed for each file found, replacing '{}' with the name. For example:- find -mtime -2 -iname 'foo*' -exec mv '{}' /folder1/folder2

Re: [Dorset] cd question

2010-11-22 Thread Peter Merchant
On Mon, 2010-11-22 at 19:30 +, John Carlyle-Clarke wrote: 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.

Re: [Dorset] cd question

2010-11-22 Thread Victor Churchill
On 22 November 2010 20:56, Peter Merchant madsmad...@netscape.net wrote: And my wife complains that under MS Windows there are so many ways to do things and why couldn't they just have one way to do it. I am lazy. From the terminal I would just type in 'sudo dolphin' and split the display

Re: [Dorset] cd question

2010-11-22 Thread Tim
On Monday 22 November 2010 20:56:34 Peter Merchant wrote: On Mon, 2010-11-22 at 19:30 +, John Carlyle-Clarke wrote: 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

Re: [Dorset] cd question

2010-11-22 Thread John Cooper
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