1

I want to do all my archiving and compression on the command line. I have a USB flash drive located at /dev/disk/by-label/SanDiskData (which links to /dev/sdc1). I thought I could simply do:

$ cd /dev/disk/by-label
$ sudo tar cfv ~/data.tar SanDiskData

But then the size of /home/data.tar is only 10 kB.

Where can I tar entire USB flash drives on the command line?

0

1 Answer 1

2

You are supposed to mount the drive before you can access its filesystem. Only if mounted you can execute filesystem operations (that is, access individual dirs and files) like tar on it via the mountpoint instead of the device node (or some symlink to it).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.