Apps :: What can you do with Emelfm?



As some of you know, Emelfm is more than just a way to view your filesystem. It is a toolbox full of useful utilities. I thought it would be great for everyone to share their mods they make to Emelfm to make it more useful.

I use the "User Commands" in the right click menu for some things. Here's my list for now.

UnPack Extension
tar -zxvf %f

View Extension
tar -ztf %f > dirlist.txt

RePack Extension
tar -T dirlist.txt --no-recursion --numeric-owner -cvf- | gzip > %{}

Mount ISO
sudo mount %f /mnt/test -o loop

The first 3 are for editing and repacking mydsl extensions. The last one is for mounting the latest DSL iso so I can update my frugal install.

Anyone else?

Chris

Well I use the midnight commander most of the time, so haven't customized emelfm much.  Most of what you have there I also have in mc, or as an alias or function.  

One thing I have done in emelfm is go to Configure -> Toolbar and change "df" to "df -h" so the df button will display in K's and M's instead of bytes.

*BOOKMARK*
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.


original here.