LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2005, 05:22 AM   #1
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Rep: Reputation: 30
zip & unzip


Hi
env:
pentium II with two hard disk.
hda installed windows98
hdb installed mandrake 10.1 (windows files mounted in /mnt/windows)
dual boot with lilo
Prb
use zip & unzip command from the linux partition to compress files of the windows partition.
example:
i create in windows98 a directory containing two *.txt files...
the first is normal,the second has the hide attribute.
i'm able to Zip from linux using the
zip -rk destination_file Source_directory
i'm able to unzip back to a win98 directory using:
unzip zipped_file -d destination_directory
but when i load again win98 the hidden file loose his attribute and now is visible....
i tried also with ark but unsuccesfully...
i'm using zip and unzip to ensure compatibility to win *.zip file format....
how to preserve the win98 files attribute in the zip/unzip process ?
thanks in advance

Maurizio
 
Old 09-03-2005, 06:44 AM   #2
rtg
Member
 
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Blog Entries: 3

Rep: Reputation: 19
Look at the rights of your hidden file under linux - they will be the same as the not hidden one. The same is for the attributes. If you need to somehow hide the file then you rename it to "dotfile" - ".hidden.txt" . Then the application decide whether to show this file or not.
The ability to hide file is built into the Windows filesystems and is not supported by Linux.
For Linux all Windows files would be equal except ones who have 'read-only' mode.
 
Old 09-03-2005, 08:23 AM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Yes thats correct posted above windows uses the h permission to denote hidden status for files this currently is not supported by the file system driver in linux as its just a stupid option anyway. Making a file hidden does nothing but prevent stupid windows users from modifying system files that they shouldent mess with. Bad thing about windows 98 is there is no security in the file system what so ever. so a hidden file still can be modifyed by any user on the system.
 
Old 09-03-2005, 11:32 AM   #4
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Original Poster
Rep: Reputation: 30
Hi
thanks for the answer.
i opend the topic because i planned to use zip or other compress utilities to fully
backup the windows partition.
i know windows function pefectly also if this files are visible..
So if the file system drive in linux do not support this,there are no other product that permit to do the work.....

sob....

Maurizio
 
Old 09-03-2005, 01:35 PM   #5
rtg
Member
 
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Blog Entries: 3

Rep: Reputation: 19
Nevertheless you can create images of the filesystems if you have enough space for backups in case you need to backup a complete disk.
[ Update ]
I mean
Code:
cat /dev/hdaX | bzip2 -9 > my_disk_backup.bz2
and later if something goes completely wrong:
Code:
bzcat my_disk_backup.bz2 > /dev/hdaX

Last edited by rtg; 09-03-2005 at 01:56 PM.
 
Old 09-04-2005, 11:29 AM   #6
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Original Poster
Rep: Reputation: 30
Hi

thanks..i will try the suggested command as
soon as possible and i will provide a feedback
Maurizio
 
Old 09-05-2005, 11:53 AM   #7
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Original Poster
Rep: Reputation: 30
Hi rtg
i launched the command you suggested.
i modify it because...
dev Hda contains only partition hda1 (win98)
so i changed the command with
cat dev/hda and i added the verbose parameter to see output progress.
i need another explanation...
i have the sensation this command save
physically all the bytes written to disk...
(the partition table is written to hda)
if the above is true what happens if i will
restore to a disk of different size ?
example hda is 1,8 gb but win 98 libraries are only 400 mb large..
if i restore to an hda of 800 mb ?
the program do not complete but the libraries are however full restored ?
thanks in advance
Maurizio
 
Old 09-06-2005, 01:08 PM   #8
rtg
Member
 
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Blog Entries: 3

Rep: Reputation: 19
There will be lots of problems when you try to unpack to the disk which capacity is smaller. The whole image is dumped with all the fragmentation and so on. (If you write it uncompressed you will even be able to mount it as a loopback device - liked to do so some time in the past).
However, it can be fixed with Partition Magick or (I am not quite sure as used not very often) PartEd. THese tools will help you to shrink or grow the written filesystem.
 
Old 09-06-2005, 01:38 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
IMHO Partimage is best tool for this particular job.
 
Old 09-06-2005, 02:37 PM   #10
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Original Poster
Rep: Reputation: 30
Hi

if yoou want to laugh.....
i'm not anglo-saxon,i'm italian,so i first done
an internet search about IMHO product
to realize only it is an achronim for
In My Humble Opinion
i learned another thing.....
however i take a look to Partimage,now i will
search an rpm version hoping that it has not so many dependencies...
thanks for the answers....both to rtg and emerson

Maurizio
 
Old 09-07-2005, 07:16 AM   #11
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Original Poster
Rep: Reputation: 30
Hi
i installed partimage and it easily backup the partition....but looking at the document it seems to do not backup the MBR
i'm working with this config....

dev hda
contains partition hda1 = win98
dev hdb
contains partition linux + swap
boot loader is lilo
lilo is written to hda MBR
partition table is written to hda

i writed also lilo on floppy disk and i verify
that it loads....

now the problem is the partion table.....
does writing lilo to floppy disk also the partition table is copied.....?

thanks

Maurizio
 
Old 09-07-2005, 08:57 AM   #12
rtg
Member
 
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Blog Entries: 3

Rep: Reputation: 19
Quote:
The partition to restore must have the same size as the saved partition. If the partition is smaller than the original one, the operation will fail. If it is bigger, space can be lost. You can read the FAQ of this handbook, for more details about this
- That's from partimage docs. The problem of non-matching size still exists. The FAT must be extended to make sure that new files will have some space for their metatdata to be stored in the File allocation table. So all the following data should be moved further.

Partimage does not store the partition table because it back ups not the whole drive, but only one partition.

---
Recently I made a backup of one fellow's HDD with FAT32 on it by mounting it and copying the data. He studies Japaneese and used Japan characters to name the files. The names were lost (erm. I could see the '??????.doc' but FAT refuses such a masked filename') and some Ukrainian letters 'i,ji,je' (we've got these ) were swapped by '?'. What is the right way to back up - use Unicode charset in the system? Only to backup something...
 
Old 09-07-2005, 07:51 PM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally posted by bong.mau
now the problem is the partion table.....
'dd' is a very powerful tool. You can use it to back up your entire disk or just the partition table.
Code:
dd if=/dev/hda of=/path_to_a_writable_device/mbr-backup bs=512 count=1
This will back up your mbr. You can increase the count as needed.
 
Old 09-09-2005, 07:18 PM   #14
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
actually if you want to resize a disk image that is formated in e2fs or e3fs you can use resize2fs and any parttioning software.


this of course has nothing to do with backing up just resizeing.


you can remove the fragmentation and other stuff with chk2fs -f as well
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unzip all .zip files in a directory tes15 Linux - Newbie 14 08-29-2014 11:46 AM
zip/unzip - file too big Joe Soap Linux - Newbie 13 03-14-2014 11:42 AM
unzip .zip >4gb dkw Linux - General 1 07-07-2005 07:27 PM
Zip and Unzip concoran Linux - General 4 08-02-2002 07:12 PM
how do i unzip a .zip? lax2sman Linux - General 2 02-11-2002 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration