[Dorset] Next Bournemouth meet?
Has a date been decided for the next Bournemouth meet? Is the plan still to meet at The Broadway on a non-karaoke night? -- New Tetris-meet-Sudoku game for Android - look for Sudoku Way on the market (light version is functional and free) Google Android, programming and web design at http://www.cogitas.net/blog/ -- 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
Re: [Dorset] cd question
On 23/11/10 19:08, Andrew R Paterson wrote: ---8<--- Snip! > On Monday 22 November 2010, Peter Merchant 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 to move them. > As an old time UNIX cli man thats exactly what I would have done! > Its exactly what they invented drag'n'drop for :) There, doesn't that look better? :-) Sean -- music, film, comics, books, rants and drivel: www.funkygibbins.me.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
Re: [Dorset] cd question
On Tue, 23 Nov 2010 19:16:54 +, andy.pater...@ntlworld.com said: > So there is a LOT of life left in in tty (CLI) only access yet! Absolutely. At work, we support and work on a large number of Linux servers around the country, and none of them has a GUI: everything done by the command line (and some distributed management tools). -- 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
Re: [Dorset] cd question
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 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 to move them. > > > > > > Watch out, you'll get me started about emacs ;-) > > I remember using emacs on the PT-121(?) terminals at Plessey. I think I > threw out the user guide for it about a year ago. > > PM > > > -- > 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 HOWEVER! I recently worked somewhere where we had to access masses of servers throughout the country over the internet (some vpn - some not) and I can tell you that a simple telnet/netterm tty login was the _only_ way and it was VERY effective - particularily when logging in via a terminal concentrator to reboot something like a sun server (i.e console only access) . So there is a LOT of life left in in tty (CLI) only access yet! -- Andy Paterson -- 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
Re: [Dorset] cd question
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 > > > > > > 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!! > > > > All the other suggestions are excellent, but let's have some more ;) > > > > You could use shell variables to remember the paths: > > > > src=/folder1/folder2/folder3/folder4/folder5 > > dst=/folder1/folder2 > > > > Then use cd "$src" and cd "$dst" as required, or mv somefile "$dst" > > > > (The quotes stop things breaking if the paths have spaces in them.) > > > > Or, how about doing (in folder5):- > > > > ls > files > > vim files > > (OR nano files, OR gedit files, as you prefer) > > > > Delete the ones you don't want to move, then save the file and: > > > > dest=/folder1/folder2; while read -r file; do mv "$file" "$dest"; done < > > files > > > > (That's all on one line but it may wrap here) > > > > That should do a move for each filename, one per line, in "files". > > > > Another way is with find, if the files have some criteria you can > > define. Find has a lot of options, and can be a bit daunting, but a > > good pattern to remember is:- > > > > find [] [] [] > > > > The default path is "." and the default action is "print", so just > > typing "find" will recursively list files in the current directory and > > subdirectories. > > > > For example, > > > > find -mtime -1 -maxdepth 1 > > > > Will print file names of files modified more recently than 24 hours ago > > in this directory only (will not go into subdirectories). > > > > There are many ways to use this. You could do:- > > > > find -mtime -2 -iname 'foo*' > files > > > > To send all files modified in the last two days matching foo* to a file > > called "files", and then use the mechanism above. > > > > Another way is to use the pattern:- > > > > find -exec '{}' \; > > > > That's a bit odd looking, but gets executed for each file > > found, replacing '{}' with the name. For example:- > > > > find -mtime -2 -iname 'foo*' -exec mv '{}' /folder1/folder2 > > > > (The first time, you may want to do.. > > > > find -mtime -2 -iname 'foo*' -exec echo mv '{}' /folder1/folder2 > > > > ) > > > > (You can probably stop here if this is getting too much, or have a cup > > of tea and come back ... ) > > > > You can also use xargs, which takes files on the standard input and > > executes a command, passing them as arguments to it. There are ways to > > control what to do if nothing is passed, or how many arguments at once > > the command can take. See man xargs for more. > > > > Here's an example:- > > > > find -mtime -2 -iname 'foo*' | xargs rm -i > > > > This will delete all files that find matches. It's easy if you want all > > the files chained onto the end of the command, but you don't so you have > > to use another option for xargs:- > > > > find -mtime -2 -iname 'foo*' | xargs -I '{}' mv '{}' /folder1/folder2 > > > > Here, -I specifies some arbitrary string which gets replaced with the > > items being fed into xargs. > > > > There's one more strange thing you might see, and that is to avoid the > > fact that here files are 1 per line, but it is technically possible for > > a filename to contain a line break. You can make find spit things out > > separated with a NULL character instead, and tell xargs to expect this. > > > > find -mtime -2 -iname 'foo*' -print0 | xargs -0 -I '{}' mv '{}' > > /folder1/folder2 > > > > One last bit of polish:- > > > > find -mtime -2 -iname 'foo*' -print0 | xargs --no-run-if-empty -0 -I > > '{}' mv '{}' /folder1/folder2 > > > > That's probably self-explanatory. > > > > I know the above look a bit odd at first, but I found I'd learn them one > > "formula" at a time and each time I needed to do something different, > > I'd learn a variation, and so on. > > > > Have fun! > > 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 to move them. > > > Peter > > > > > > > > -- > 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 As an old time UNIX cli man thats exactly what I would have done! Its exactly what they invented drag'n'drop for :) -- Andy Paterson -- Next meeting: Somewhere quiet, Bournemouth, ???day 2010-12-?? 20:00 Mee
Re: [Dorset] cd question
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!! I use MidnightCommander (aka mc) for that sort of thing. See http://www.midnight-commander.org/ Install with aptitude install mc or equivalent. cheers Chris -- Chris Dennis cgden...@btinternet.com Fordingbridge, Hampshire, 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
Re: [Dorset] dorset Digest, Vol 360, Issue 1
On 22/11/10 19:30, dorset-requ...@mailman.lug.org.uk wrote: Now I want to go back to work in folder2, what the easy command to get me back there?? The easy command to go back to your previous directory is 'cd -' Brian M -- 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
Re: [Dorset] cd question
On Mon, 2010-11-22 at 22:51 +, Victor Churchill wrote: > On 22 November 2010 20:56, Peter Merchant 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 to move them. > > > > Watch out, you'll get me started about emacs ;-) > I remember using emacs on the PT-121(?) terminals at Plessey. I think I threw out the user guide for it about a year ago. PM -- 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