Wallex
10-14-2002, 10:22 AM
After doing a search around, I learned how to tar a directory using the 'normal method' (it's some post in the How I did it! forum), okay... but I am too lazy and have bad memory as to remember to type down how to tar a file whenever I need to, so instead I wanted to add a nice button in Emelfm to tar down a directory... the question is how to do it... I can't use tar to automatically create the filename of the tar file, can I? I am forced to do a tar -cvf dirname.tar path/dirname... and given the 'variables' Emelfm gives me, this is as close as I've gotten to that: tar -cvf %f.tar %d/%f After experimenting for a while (using echo to actually see what the button would do) I notice that when I choose a directory and then press my new button, this is the result (if I select /var/log/, for example):
tar -cvf log .tar /var/log
See that there's a space between log and .tar? I never asked for that space... how can I remove it? is there some character used to concatenate strings?
tar -cvf log .tar /var/log
See that there's a space between log and .tar? I never asked for that space... how can I remove it? is there some character used to concatenate strings?