LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .tar file options (https://www.linuxquestions.org/questions/linux-newbie-8/tar-file-options-4175572991/)

chris_crunch 02-23-2016 02:52 AM

.tar file options
 
There's a file on my computer known as

Code:

ILSVRC2012_img_train(0)(0)(0).tar
Now I guess I could unpack it with

Code:

tar xvf ILSVRC2012_img_train(0)(0)(0).tar
But is there a better way to do this? This seems to be taking ages, spewing the files all over the current directory...

pan64 02-23-2016 02:57 AM

how big is that file? Actually the command tar is used to handle those files, so there is no better way. But it also depends on the speed of the underlying filesystem.

chris_crunch 02-23-2016 03:13 AM

It's a... pretty big. I think it contains a lot of tar files...

Code:

chris@chris-crunch:~/apps/caffe-master/IMAGENET/training_data$ tar xvf ILSVRC2012_img_train\(0\)\(0\)\(0\).tar
n01440764.tar
n01443537.tar
n01484850.tar
n01491361.tar
n01494475.tar
n01496331.tar
n01498041.tar
n01514668.tar
n01514859.tar
n01518878.tar
n01530575.tar
n01531178.tar
n01532829.tar
n01534433.tar
n01537544.tar
...
...

There's loads of these. Loads...

I've rapidly hit this problem:

Code:

tar: n12144580.tar: Cannot write: No space left on device
Hmmm...?

chris_crunch 02-23-2016 03:15 AM

Code:

chris@chris-crunch:~/apps/caffe-master/IMAGENET/training_data$ df
Filesystem    1K-blocks      Used Available Use% Mounted on
udev            8174348        4  8174344  1% /dev
tmpfs            1637028      1232  1635796  1% /run
/dev/sda1      57561340  6606152  48008116  13% /
none                  4        0        4  0% /sys/fs/cgroup
none                5120        0      5120  0% /run/lock
none            8185136    166728  8018408  3% /run/shm
none              102400        80    102320  1% /run/user
/dev/sdb1      288237920 273572628      540 100% /home
/dev/sdb6      317272452    68296 301064536  1% /data1
/dev/sdb7      307462264    64344 291756628  1% /data2

Hahaha, damn it. What now...
I guess I could somehow put them into data1. how?

Code:

chris@chris-crunch:~/apps/caffe-master/IMAGENET$ sudo cp training_data/ /data1/IMAGENET/
cp: omitting directory ‘training_data/’

What- Never mind. I place the -r after copy. Okay, this is taking a while to copy... Hehe

pan64 02-23-2016 03:37 AM

see man tar
tar -C <your preferred dir> -xvf <full path to your tar file>


All times are GMT -5. The time now is 07:42 PM.