1829158 Members
2324 Online
109986 Solutions
New Discussion

Re: tar error

 
Mrjas
Occasional Advisor

tar error

while I try to tar all files in the directory.
the following error come up
(tar : Read-only file system), then it skip the tar
my command was (tar cvf jas.tar /tmp/jas/*)
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: tar error

"pwd"? Where were you when you tried to
create your "jas.tar"?

Why "/tmp/jas/*", instead of, say,
"/tmp/jas"?

Where would you like "jas.tar" to be?

How much of the path "/tmp/jas/file" would
you like stored in the archive? For example,
if you use a command like:

( cd /tmp ; tar cf /path/jas.tar jas )

then the archive will contain paths like:

jas/file

instead of

/tmp/jas/file

Most people would rather restore files with
relative paths (like "jas/file"), than files
with absolute paths (like "/tmp/jas/file"),
because any "tar" program will let the user
put a relative path where the user wants it,
but many "tar" programs can't do that with an
absolute path.
Rob Leadbeater
Honored Contributor

Re: tar error

In addition to Steven's suggestions you may want to check that you can create any file in the directory where the tar command was run.

touch test.file

If that also comes up with "Read-only file system" then you don't have a problem with tar.

Cheers,

Rob