WoofyDugfock
Group: Members
Posts: 146
Joined: Sep. 2004 |
|
Posted: Sep. 08 2005,10:10 |
|
Too potentially useful a thread to die off so easily...
Here's a few things:
1. People have posted a number of different 'find' buttons - after trying various things, this is mine:
F=%{Find what:} && sudo find / -name $(basename "$F") -print 2>/dev/null | grep -E "$F"
Can do wildcards and (end) parts of paths egs. a) enter gp* and gnupg.dsl is installed --> returns all files whose basename starts with gp b) enter *gp* --> returns all files whose basenames contain string gp c) enter '/bin/gpg' (with inverted commas) -->returns /ramdisk/usr/bin/gpg d) enter '/bin/gp'? -->returns /ramdisk/usr/bin/gpg
On dsl toram runs fast, but too slow on debian hd install. I use it all the time.
2. For a challenge, a while ago I wanted to see if I could fit iso make, mount & umount buttons into single lines (crazy - these ought to be scripts!). Oh well what the heck:
Make iso (enter /path/to/directory containing stuff to go into iso):
B=%{Make ISO from ...} && A=%{Enter "name"(.iso)}.iso && mkisofs -max-iso9660-filenames-allow-lowercase -quiet -J -l -L -r -R -o $A $B 2> /dev/null && echo "$A made ok"|| echo "Can't make $A"
Mount iso (select iso file in emelfm; makes mount point directory):
F=%f && C=`file $F|awk -F: '/ISO/{print $1}'` && N=~/`basename ${C%.iso} 2>/dev/null` && mkdir $N && sudo mount -o loop -t iso9660 $F $N && echo "$F is mounted on $N" || echo "Error mounting"
Unmount iso (enter either /path/to/isofile or /path/to/mountdirectory):
C=%{Umount this ..} && [ $C != iso ] && D=`mount|grep $C |awk '{print $3}'` && sudo umount $D 2>/dev/null && rm -rf $D && echo "Umounted $D OK" || echo "Error umounting $D"
Disclaimer: *Of course* I wouldn't at all be surprised if there were better/neater ways of doing the above things.
EDIT1: That Make iso button is not what you want if you intend to burn a boot cd from the resulting iso. See Meo's remastering guide in the online docs for the appropriate mkisofs command.
EDIT2: My mount iso button is busier than Clivesay's since it first tests that the iso file actually is an iso file, then it names the mount point directory after the iso file. That might be useful if you're simultaneously mounting more than one iso file.
All grist for the collective mill anyway.
-------------- "We don't need no stinkin' Windows"
http://news.zdnet.co.uk/software/linuxunix/0,39020390,39149796,00.htm
|