Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Re: undo a tar





> Quoth Shawn (Thu 2004-08-05 04:01:23PM +0900):
>

That "Quoth" is just too cool.

>> I need to undo a tar
>> I tried
>> tar tfz filename.tar.gz | xargs rm
>>
>> rm: cannot remove `OOo_1.1.2_LinuxIntel_install/f_0408': No such file or
>> directory
>
> How about:
>
> for i in `tar tfz filename.tar.gz`; do [ -e "$i" ] && rm "$i"; done

ran but didn't work.

I need to strip "OOo_1.1.2_LinuxIntel_install/" from each arg before it gets passed to rm

for i in `tar tfz ~/downloads/OOo_1.1.1_LinuxIntel_install.tar.gz`; do echo "$i"|cut -c 30-;done
will print out the files I want to rm such as
f_0430
f_0431
f_0432

but
for i in `tar tfz ~/downloads/OOo_1.1.1_LinuxIntel_install.tar.gz`; do rm "$i"|cut -c 30-;done
gives me
rm: cannot remove `OOo_1.1.1_LinuxIntel_install/f_0432': No such file or directory


<unrelated>
Anyway, I got the family pics to be vertical and the right size for a web page in a shell with
mogrify -rotate "-90>" *.jpg
mogrify -scale '350>x' *.jpg
and had so much fun that I am still too lightheaded for more just now.  It was such a hassle doing it by hand.
</unrelated>


-- 
Shawn

Karma is immutable, so act accordingly!
 


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links