You are not logged in.

#1 2014-03-29 01:16:29

stephenl7797
Member
Registered: 2014-02-09
Posts: 11

Xfce + Thunar -- untar to new directory

Whats the easiest way to untar a file to a new directory. For example a tar file a in directory 'dir' has files b and c. When I extract a, I want b and c to be in a new folder called 'dir/a/' instead of just 'dir/'.

Offline

#2 2014-03-29 03:26:31

toz
Member
Registered: 2011-10-28
Posts: 513

Re: Xfce + Thunar -- untar to new directory

You can either use the thunar-archive-plugin or create a Thunar Custom Action like:

Name: Auto-extract to folder
Command:

for file in %F; do dir=`echo "$file"|sed 's/\.\+\(tar\|tgz\|tbz2\|txz\).*$//g'`;mkdir "$dir";cd "$dir";tar xf "$file";cd -;done

Appearance Conditions: Other files
Source

Offline

#3 2014-03-29 03:30:59

nullified
Member
From: Massachusetts, USA
Registered: 2013-12-09
Posts: 468

Re: Xfce + Thunar -- untar to new directory

thunar-archive-plugin and file-roller  get the job done easily


"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace

Offline

Board footer

Powered by FluxBB