Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
based on that that is a disk error. You ought to run a disk check (smartctl?). Also you can check /var/log probably you can see something related inside.
also you might check which file has a file descriptor 4 (you need to find a line whith an = 4 at the end. reading that file caused that io error.
based on that that is a disk error. You ought to run a disk check (smartctl?). Also you can check /var/log probably you can see something related inside.
also you might check which file has a file descriptor 4 (you need to find a line whith an = 4 at the end. reading that file caused that io error.
How can it be a disk error when ubuntu is being run on a virtual machine and the zipping process is from a webdav server ? Do i need to do a disk chrck on both windows and linux vm ? i am pretty sure no files are corrupt on my android
it is an i/o error, you could see it. Now you need to find out where is it coming from. So my idea is to check the file, disk, logs.
Actually you might replace zip:
it is an i/o error, you could see it. Now you need to find out where is it coming from. So my idea is to check the file, disk, logs.
Actually you might replace zip:
it is an i/o error, you could see it. Now you need to find out where is it coming from. So my idea is to check the file, disk, logs.
Actually you might replace zip:
This is another input output error with your command. What is your command supposed to actually do ? Also, should I change hard drives? is my .vdi corrupted? I did defragmentation on my windows ssd and it shows to be perfectly normal. Since I'm running ubuntu in a vm, how can I test if the .vdi is corrupted or not ?
based on that that is a disk error. You ought to run a disk check (smartctl?). Also you can check /var/log probably you can see something related inside.
also you might check which file has a file descriptor 4 (you need to find a line whith an = 4 at the end. reading that file caused that io error.
There are alot of files in /var/log what file am I specifically looking for ? I don't know what /var/log files do or what they mean
[update] Alright, so I installed ubuntu 23.04 on a new ADATA 240 GB ssd and hoping this would work now. I've also switched the SATA cable to another port on the motherboard and make sure it is secured properly.
[update 2] so it seems that even with a new installation of ubuntu on a separate hard drive, I am still getting zip I/O error: Bad address
zip error: Output file write failure (write error on zip file) error. I know it can't be a faulty ssd because it's brand new barely used for a month. Something odd has been going on, when I use
Code:
find ./sdcard/DCIM/Camera -exec zip -0 /path/to/zip/file.zip {} +
then this fails after some number of pictures/videos and results in the I/O error. But when I use it without the -0 then I get random messages with zip warning: file size changed while zipping but it continues to finish and make the zip. What behavior is this?
[update 3] It seems like when zipping .mp4 files, find crashes and returns zip I/O error: Bad address zip error: Output file write failure (write error on zip file) error. But when I try to only include .jpg files, there is no error reported. Why does find & zip fail when adding .mp4 files? See attached below
This is another input output error with your command. What is your command supposed to actually do ? Also, should I change hard drives? is my .vdi corrupted? I did defragmentation on my windows ssd and it shows to be perfectly normal. Since I'm running ubuntu in a vm, how can I test if the .vdi is corrupted or not ?
most probably that sd card is useless. It is not a problem with zip or your OS, but what you want to read (I don't know if it is a hdd, an sd card or a virtual disk).
most probably that sd card is useless. It is not a problem with zip or your OS, but what you want to read (I don't know if it is a hdd, an sd card or a virtual disk).
I've switched from virtualbox to actually installing ubuntu on a actual ssd. The same problem occurs with adding .mp4 files. Please see my previous screenshot. Mind you, I didn't mount the actual sdcard from my s8 as a webdav, sdcard is the name of the root folder of the internal storage.
In the below screenshot, the left side is 2022-04-09-144320205.mp4 on my actual galaxy s8. The right side is the same file but in a webdav server. From it, you can see the file type is something wierd like Binary (application/octet-stream). Why doesn't find add this file? is it because it doesn't show it as a recognized file? find can add pdf files and other formats but somehow this causes a problem.
You can't really trust how things are identified in Linux. Linux has some guessing method, but it not like other OS'es with an extension map. It really only knows executables and binaries and there is a file that can guess by the first few bytes of a file.
If that find with cat worked without error (it is simply reading every byte of the file and writing it to /dev/null, a trash bucket), then it simply
cannot be any disk error on read. Zip has file size limitations, but it should be 64 aware to allow > 4GB limit:
Code:
$ which zip
/usr/bin/zip
$ zip -v
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.
Compiled with gcc 6.3.0 20170415 for Unix (Linux ELF).
Zip special compilation options:
USE_EF_UT_TIME (store Universal Time)
BZIP2_SUPPORT (bzip2 library version 1.0.8, 13-Jul-2019)
bzip2 code and library copyright (c) Julian R Seward
(See the bzip2 license for terms of use)
SYMLINK_SUPPORT (symbolic links supported)
LARGE_FILE_SUPPORT (can read and write large files on file system)
ZIP64_SUPPORT (use Zip64 to store large files in archives) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
UNICODE_SUPPORT (store and read UTF-8 Unicode paths)
STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
UIDGID_NOT_16BIT (old Unix 16-bit UID/GID extra field not used)
[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)
Encryption notice:
The encryption code of this program is not copyrighted and is
put in the public domain. It was originally written in Europe
and, to the best of our knowledge, can be freely distributed
in both source and object forms from any country, including
the USA under License Exception TSU of the U.S. Export
Administration Regulations (section 740.13(e)) of 6 June 2002.
Zip environment options:
ZIP: [none]
The file size changing is strange. That means zip was trying to read a file and during the read, the file change (usually some log fie or access) or you are somehow included the output file with the input.
Your latest test seems to indicate the write is failing, what is the target or your zip archive?
You can't really trust how things are identified in Linux. Linux has some guessing method, but it not like other OS'es with an extension map. It really only knows executables and binaries and there is a file that can guess by the first few bytes of a file.
If that find with cat worked without error (it is simply reading every byte of the file and writing it to /dev/null, a trash bucket), then it simply
cannot be any disk error on read. Zip has file size limitations, but it should be 64 aware to allow > 4GB limit:
Code:
$ which zip
/usr/bin/zip
$ zip -v
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.
Compiled with gcc 6.3.0 20170415 for Unix (Linux ELF).
Zip special compilation options:
USE_EF_UT_TIME (store Universal Time)
BZIP2_SUPPORT (bzip2 library version 1.0.8, 13-Jul-2019)
bzip2 code and library copyright (c) Julian R Seward
(See the bzip2 license for terms of use)
SYMLINK_SUPPORT (symbolic links supported)
LARGE_FILE_SUPPORT (can read and write large files on file system)
ZIP64_SUPPORT (use Zip64 to store large files in archives) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
UNICODE_SUPPORT (store and read UTF-8 Unicode paths)
STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
UIDGID_NOT_16BIT (old Unix 16-bit UID/GID extra field not used)
[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)
Encryption notice:
The encryption code of this program is not copyrighted and is
put in the public domain. It was originally written in Europe
and, to the best of our knowledge, can be freely distributed
in both source and object forms from any country, including
the USA under License Exception TSU of the U.S. Export
Administration Regulations (section 740.13(e)) of 6 June 2002.
Zip environment options:
ZIP: [none]
The file size changing is strange. That means zip was trying to read a file and during the read, the file change (usually some log fie or access) or you are somehow included the output file with the input.
Your latest test seems to indicate the write is failing, what is the target or your zip archive?
The target of my zip is in the /home/username/Documents/ folder. You can see my command line syntaxes from all the screenshots since the beginning of this thread. Even then if linux doesn't recognize a file extension, it should still save it in a zip. I know my hard drive is not failing, how do I know or trace the process of how find and zip are working together to see what files are being created, what are being deleted and what is being moved around ? Is there a detailed view of the entire process?
Are you suggesting that I use Zip64 option and if so, how do I use it ? Even in a folder called .thumbnails under DCIM/ which contains 5,000 small files, zip and find lags and stops somewhere middle of the process of zipping. It is getting very annoying to the point that is making me believe zip and find have bugs and is an incomplete piece of code from the developers
No I am suggesting first make sure you are using the right zip. Second, that has 64 bit enabled or built.
isn't the default zip command in linux info-zip 64 bit zip only ?
Quote:
Originally Posted by elgrandeperro
Zip is an old win utility. I never had the problems you are having, but I only extract, not create.
I'd convert to tar (since you aren't compressing) and see if it works.
Does tar preserve all the file and folder timestamps ?
update — when i connected my phone as a MTP device directly without making any network share, I am still getting input output error for folders and files at random. So, connecting with usb cable and connecting my android normally also gives I/O errors in addition to I/O errors with using webdav shares. Is there something deeper going on ? beyond hardware?
If it logged a hardware error, most likely in /var/log/syslog or /var/log/messages. Bus like errors are hard to debug because they can involve multiple devices or one device could be interfering with things.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.