When I extract a tar file using this command: tar xvzf gcc-4.7.1.tar.gz

(This is the directory the tar file is in: cd /u/test/GCC-4.7.1/)

The files were extracted but they are in /dev/... (see below for actual file paths and names) - How do I install GCC from this point now?

This is probably related to my other question, but I am now using SCO 6 (not SCO 5.0.7) and a new GCC compiler.

The files I extracted are not in the same folder where the tar file is either.

Extracting files

Below are the exact steps I took to extract and search for the files I extracted:

  1. cd /u/test/GCC-4.7.1/
  2. tar xvzf gcc-4.7.1.tar.gz
  3. cd /u/test/GCC-4.7.1/
  4. ls -la

The only file in there is the tar file.


The tar extracted successfully showing this:

key    Device           Block   Size(K)  Tape
0    /dev/rfdo48ds9      18     360      No
1    /dev/rfd148dx9      18     360      NO
2    /dev/rfd096ds15     10     1200     NO
3    /dev/rfd196ds15     10     1200     NO
4    /dev/rfd0135ds9     18     720      NO
5    /dev/rfd1135ds9     18     720      NO
6    /dev/rfd0135ds18    18     1440     NO
7    /dev/rfd1135ds18    18     1440     NO
8    /dev/rct0           20     0        YES
9    /dev/rctmini        20     0        YES
10   /dev/rdsk/fp03d     18     720      NO
11   /dev/rdsk/fp03h     18     1440     NO
12   /dev/rdsk/fp03v21   10     20330    NO

1 Answer 1


The files were extracted but they are in /dev/...

I doubted that could happen when I first read your question, because tar programs have for many years been stripping leading / from paths automatically for security reasons. Without that protection, you could ship someone a malicious tarball that overwrote system files. Think of the fun you could have by shipping someone hand-crafted /etc/passwd and /etc/shadow files, for example. A tar program that doesn't strip leading / would extract them over the existing files. However, I did some research and found that SCO OpenServer 6 doesn't provide that protection by default! You have to give the A flag to get that behavior. Ugh.

That said, I still doubt it did what you claim unless you were logged in as root, which I doubt given the /u/test stuff in your question. A regular user can't create files in /dev unless someone's been monkeying with the default file permissions.

Since you gave the v flag to tar, you should have gotten a list of files if the extraction went off successfully. Did you? Could you post that list somewhere, such as at pastebin.com?

Do you have GNU tar installed already? If you're using SCO tar, it doesn't understand the z flag for un-gzipping the file before un-tarring it. Say gzip -dc gcc-4.7.1.tar.gz | tar xAvf - instead.

  • I have added the Successful extraction in the description, as the VM I am using, I can't copy and paste the list of files. So I had to write it out in the description instead.
    – Kevdog777
    Commented Jul 30, 2012 at 12:17
  • I have just tried the gzip -dc gcc-4.7.1.tar.gz | tar xAvf and that has shown: tar: device argument required - I executed this script as root.
    – Kevdog777
    Commented Jul 30, 2012 at 12:19
  • @Kevdog777: You must have missed the dash argument at the end. As for getting the file list out of the VM: gzip -dc gcc-4.7.1.tar.gz | tar xAvf - > file-list 2>&1, then send the file out somehow. FTP, email, Z-modem... Commented Jul 30, 2012 at 12:25
  • Ah, that helps, haha. Well it sort of helped, it was better than the previous error. I now got: tar: suppressing absolute pathnames tar: 1 file(s) not extracted
    – Kevdog777
    Commented Jul 30, 2012 at 12:29
  • Sorry I now forgot the > symbol. It looks like it is trying to do something now.
    – Kevdog777
    Commented Jul 30, 2012 at 12:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .