Tuesday, May 14, 2013

How can i unzip and rename the output a zip file using Linux CLI?

Q. my problem is that the files inside the zip have a windows non unicode titles so after i "unzip" ,linux fails to write them to the Hdd because of their kwirky names ,so is there a way to unzip and rename the output immidiatly?

A. Unzip seems to be flawed in this capability.

Although I know of no way to change file filename on extraction, you could try these options:

-p extract files to pipe (stdout). Nothing but the file data is
sent to stdout, and the files are always extracted in binary
format, just as they are stored (no conversions).

-a convert text files. Ordinarily all files are extracted exactly
as they are stored (as ``binary`` files). The -a option causes
files identified by zip as text files (those with the `t` label
in zipinfo listings, rather than `b`) to be automatically
extracted as such, converting line endings, end-of-file charac-
ters and the character set itself as necessary. (For example,
Unix files use line feeds (LFs) for end-of-line (EOL) and have
no end-of-file (EOF) marker; Macintoshes use carriage returns
(CRs) for EOLs; and most PC operating systems use CR+LF for EOLs
and control-Z for EOF. In addition, IBM mainframes and the
Michigan Terminal System use EBCDIC rather than the more common
ASCII character set, and NT supports Unicode.) Note that zip`s
identification of text files is by no means perfect; some
``text`` files may actually be binary and vice versa. unzip
therefore prints ``[text]`` or ``[binary]`` as a visual check
for each file it extracts when using the -a option. The -aa
option forces all files to be extracted as text, regardless of
the supposed file type.

-b [general] treat all files as binary (no text conversions). This
is a shortcut for ---a.

-b [Tandem] force the creation files with filecode type 180 (`C`)
when extracting Zip entries marked as "text". (On Tandem, -a is
enabled by default, see above).

-b [VMS] auto-convert binary files (see -a above) to fixed-length,
512-byte record format. Doubling the option (-bb) forces all
files to be extracted in this format. When extracting to stan-
dard output (-c or -p option in effect), the default conversion
of text record delimiters is disabled for binary (-b) resp. all
(-bb) files.

If you know the encoding format of the files inside the archive, read the whiteboard section of this post for a possible clue:

https://blueprints.launchpad.net/unzip/+spec/unzip-detect-filename-encoding

It might be easier to extract them and rename on a windows machine.

how do i install heroes of newerth for linux mint?
Q. I am a complete noob on linux and I need some help. After I download HON for linux and I try to open it, it says I need to open with an appilcation, I have no idea how to do that, please help.

A. Was the file you downloaded a compressed file? More than likely it was and you don't have a program to decompress the file. To expand compressed file (decompresses) you can use and gzip -d, bunzip2 (bzip2 -d), unzip commands. See the link below for more info. that should help you out.

http://www.cyberciti.biz/howto/question/general/compress-file-unix-linux-cheat-sheet.php

http://www.cyberciti.biz/tips/how-can-i-zipping-and-unzipping-files-under-linux.html

How to install linux on a virus-infected computer?
Q. So, I unzipped the files I downloaded from Ubuntu. Then I burned them on a blank DVD. Now, I'm trying to run it on my other computer, and it doesn't work. When I put the disk into my laptop, it asks me if I want to run the wubi install. I'm trying to install it right on my hard drive.

A. Oh boy here we go(this is gonna be long, but I love to send people away from Windows and into Linux).
OK SO, when your pc boots up hit ESC as soon as you see the computer manufacturers logo(Dell, HP, Compaq, Acer, whatever it is). Then depending on your computer you will want to look around for the "Boot Sequence" Once you find it, put your "Internal CD/DVD-ROM" device on the top. then, insert the dvd then reboot, you should automatically boot to the Ubuntu DVD.
Good luck
Linux Rocks btw.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment