Other how tar(1) works ?

Hi gang !

I've a file myfile.out. Using file(1) I've seen that it is a zipped file.
file returns: Zip archive data, at least v2.0 to extract

Code:
tar -tvf myfile.out
shows that the archive is composed by one only folder containing several files inside it:

folder_name\\file1 (\\ double-back-slash)
folder_name\\file2
.......

I've decompressed it with:
Code:
tar -xvf myfile.out
however, it shows a strange behaviour: it doens't extract the folder with inside the files, but any file changing its name in:

folder_name\file1 (\ back-slash)
folder_name\file2
.......

Question.
Could be related to the extension .out.
Does maybe tar(8) work only with .tar/.tar.gz extensions ?

Tips are appreciated ?

NOTE: Using winrar I've extracted its content, consisting of a folder containing several files inside it.
Thanks in advance.
 
Apart from UNC pathnames or using a backslash to escape another character (here it would be to escape the second backslash), I've never seen double backslashes being used like that.

bsdtar(1) has absolutely no problem listing or extracting .zip files.

Even if they're created on Windows, bsdtar(1) shows forward-slash paths, e.g.:
fetch http://www.irfanview.net/plugins/irfanview_shell_extension.zip
tar -tvf irfanview_shell_extension.zip
Code:
drwxrwxrwx  0 0      0           0 Jun 19  2014 32 bit/
-rw-rw-rw-  0 0      0       77824 Jan  9 14:28 32 bit/IrfanViewShellExt.dll
drwxrwxrwx  0 0      0           0 Jun 19  2014 64 bit/
-rw-rw-rw-  0 0      0          43 Jul 27  2017 32 bit/install.bat
-rw-rw-rw-  0 0      0          46 Jul 27  2017 32 bit/uninstall.bat
-rw-rw-rw-  0 0      0          45 Jul 27  2017 64 bit/install.bat
-rw-rw-rw-  0 0      0      167424 Jan  9 14:13 64 bit/IrfanViewShellExt64.dll
-rw-rw-rw-  0 0      0          46 Jul 27  2017 64 bit/uninstall.bat
-rw-rw-rw-  0 0      0        2898 Jul 27  2017 Readme_first.txt


And no, extensions are mostly for information purpose only. Most programs will happily use whatever extension you throw at them. So filename.zip is just as good as filename.meh.blah as far as listing and extracting goes.

By the way, have you tried archivers/unzip?
 
Do you have a FreeBSD desktop?
Hello Phishfry,
no, I've not FreeBSD Desktop. I work with the CLI.


No, it does'n work.
The strange thing is that:

7z -l myfile.out list the content of the myfile.out with one single backslash:
folder_name\file1 (\ back-slash)
folder_name\file2
.......

The same happens if I uncompress the archive with: 7z -e myfile.out. the name of the folder is glued to the name of the files by the backslash:

folder_name\file1 (\ back-slash)
folder_name\file2
.......


I never seen this strange nomenclature.
 
Back
Top