LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-29-2023, 03:31 PM   #31
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by elgrandeperro View Post
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.
I got a typical zip error: Output file write failure (write error on zip file) but I did not see any logs in /var/log/syslog or /var/log/messages. I've attached my ssd into another computer with specs:

Dell optiplex 9020
intel core i5-4570
intel hd graphics 4600
Adata 240 GB ssd
Fedora Linux 38
kernel version Linux 6.2.15-300.fc38.x86_64

perhaps zip and find together can zip up files and folders in smaller chunks instead of unmanageable chunks. Is this possible?

When using
Code:
find ./sdcard -type d -exec zip -0 -r /home/username/Documents/archive.zip {} +
these are only supposed to zip folders which shouldn't be a heavy load on this system but instead it gives me
Code:
*** buffer overflow detected ***: terminated

Last edited by anmac1789; 05-29-2023 at 05:49 PM.
 
Old 05-29-2023, 11:46 PM   #32
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
You don't want -type d, that only adds directories to the zip. And I don't think you need the -r (find is doing the recursive op for you).

Try this:

find ./sdcard -print | xargs zip -0 /home/username/Documents/archive.zip

Which approximates the '+' sign on the end of your find command but perhaps it might be broken.
 
Old 05-30-2023, 12:17 AM   #33
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by elgrandeperro View Post
You don't want -type d, that only adds directories to the zip. And I don't think you need the -r (find is doing the recursive op for you).

Try this:

find ./sdcard -print | xargs zip -0 /home/username/Documents/archive.zip

Which approximates the '+' sign on the end of your find command but perhaps it might be broken.
What does xargs do in this syntax ? I am receiving alot of zip warning: name not matched lines in the output

The funny thing is that I am trying to use the same find and zip commands on a new pixel 7 device and it seems to not give me zip I/O errors. The space on my galaxy s8 is 63.77 GB/64 GB and I have a bunch of different smb and ftp apps installed. I just did a
Code:
find ./DCIM/Camera -print -exec zip -0 /home/username/Documents/test.zip {} +
test on the pixel 7 and it is at the moment zipping the DCIM/Camera folder without any issues including .mp4 and .jpg files. It seems like there is an actual problem on the s8 weather its conflicting apps or a software issue with android 9.

Last edited by anmac1789; 05-30-2023 at 12:27 AM.
 
Old 05-30-2023, 12:37 AM   #34
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
Quote:
Originally Posted by anmac1789 View Post
isn't the default zip command in linux info-zip 64 bit zip only ?



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?
That means it is an error on the phone, it is independent from that find command or zip or anything else. But we don't know anything about the phone, sd card, configuration and environment, hard to say anything. Can you use it with the phone at all?
 
Old 05-30-2023, 12:51 AM   #35
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
That means it is an error on the phone, it is independent from that find command or zip or anything else. But we don't know anything about the phone, sd card, configuration and environment, hard to say anything. Can you use it with the phone at all?
What do you mean ? I can still use my galaxy s8 normally but it's just that there are many apps and the storage is near to 64 GB the phone works fine i can use the apps and stuff. What information do you need about the phone ? I am not using an sdcard, there is no micro sd card inside the phone

To make troubleshooting this easier, would you like remote assistance of my phone so that we can see in real time what's happening?

Last edited by anmac1789; 05-30-2023 at 12:52 AM.
 
Old 05-30-2023, 01:09 AM   #36
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
Quote:
Originally Posted by anmac1789 View Post
What do you mean ? I can still use my galaxy s8 normally but it's just that there are many apps and the storage is near to 64 GB the phone works fine i can use the apps and stuff. What information do you need about the phone ? I am not using an sdcard, there is no micro sd card inside the phone

To make troubleshooting this easier, would you like remote assistance of my phone so that we can see in real time what's happening?
Since you gave no details actually I don't know your setup. What I only see is that i/o error, which means some device cannot be read. I have no idea what is exactly that directory (named sdcard ar DCIM), but it looks like it is inaccessible.
The random error may mean it is only a problem with your cable, but actually I'm not really sure about that.
You have to identify what caused this i/o error (and on exactly on which device).
 
Old 05-30-2023, 01:25 AM   #37
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
Since you gave no details actually I don't know your setup. What I only see is that i/o error, which means some device cannot be read. I have no idea what is exactly that directory (named sdcard ar DCIM), but it looks like it is inaccessible.
The random error may mean it is only a problem with your cable, but actually I'm not really sure about that.
You have to identify what caused this i/o error (and on exactly on which device).
What do you mean my setup ? I've already given you what I am using...I am using a samsung galaxy s8 and fedora 38. What do you exactly mean by mode details ?
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2023-05-30 02-24-07.png
Views:	8
Size:	114.9 KB
ID:	41116   Click image for larger version

Name:	Screenshot from 2023-05-30 02-26-01.png
Views:	5
Size:	84.4 KB
ID:	41117   Click image for larger version

Name:	Screenshot from 2023-05-30 02-28-32.png
Views:	5
Size:	202.8 KB
ID:	41118  

Last edited by anmac1789; 05-30-2023 at 02:09 PM.
 
Old 05-30-2023, 10:21 PM   #38
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Any suggestions?
 
Old 05-31-2023, 12:37 AM   #39
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,748

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
1. The error is with zip. find has nothing to do with it, IMO.
2. Logs: do
Code:
ls -ltr /var/log/
right after zip fails and cat the most recently changed files to see if there’s any indication of cause.
3. How big is the source directory? Mayhaps you’re running out of room.
4. Check the man page for zip. There should be a way to have it be more verbose.

Last edited by scasey; 05-31-2023 at 02:27 PM.
 
Old 05-31-2023, 12:52 AM   #40
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
Quote:
Originally Posted by scasey View Post
1. The error is with zip. find has nothing to do with it, IMO.
2. Logs: do
Code:
ls -ltr /var log/
right after zip fails and cat the most recently changed files to see if there’s any indication of cause.
3. How big is the source directory? Mayhaps you’re running out of room.
4. Check the man page for zip. There should be a way to have it be more verbose.
No, this i/o error occurs when accessing files inside the sdcard directory. This is a remote webdav directory and either the driver is incorrect or there is a permission issue, misconfiguration or something is wrong with the phone, but who knows?
 
Old 05-31-2023, 01:12 AM   #41
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by scasey View Post
1. The error is with zip. find has nothing to do with it, IMO.
2. Logs: do
Code:
ls -ltr /var log/
right after zip fails and cat the most recently changed files to see if there’s any indication of cause.
When I typed this command it said
Code:
ls: cannot access 'log/': No such file or directory
Click image for larger version

Name:	Screenshot from 2023-05-31 02-04-59.png
Views:	3
Size:	132.9 KB
ID:	41126

Quote:
Originally Posted by scasey View Post
3. How big is the source directory? Mayhaps you’re running out of room.
The source directory is 186.3 MB free as seen in the attachment

Click image for larger version

Name:	Screenshot from 2023-05-31 02-09-44.png
Views:	5
Size:	94.8 KB
ID:	41127

Quote:
Originally Posted by scasey View Post
4. Check the man page for zip. There should be a way to have it be more verbose.
The only thing I came across is that -v is displayed after a command is successful not after it fails...
 
Old 05-31-2023, 01:15 AM   #42
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
No, this i/o error occurs when accessing files inside the sdcard directory. This is a remote webdav directory and either the driver is incorrect or there is a permission issue, misconfiguration or something is wrong with the phone, but who knows?
That's what I think but we need to determine what exactly is interfering. Which driver specifically ? is it the ubuntu drivers or the galaxy s8 drivers? I am using a genuine samsung OEM USB cable. At what steps does the find or zip command check for permissions? maybe we need to change permissions at some step in the process...
 
Old 05-31-2023, 03:02 AM   #43
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
Quote:
Originally Posted by anmac1789 View Post
That's what I think but we need to determine what exactly is interfering. Which driver specifically ? is it the ubuntu drivers or the galaxy s8 drivers? I am using a genuine samsung OEM USB cable. At what steps does the find or zip command check for permissions? maybe we need to change permissions at some step in the process...
This is not the find or zip, it is the filesystem access itself, does not depend on the tool you use (as you could see cat produced the same error). Also you could see (based on the strace output) a simple read caused the i/o error. You might check the logs of webdav (if there were any) to see what's going on. Probably you can find something in /var/log.
this is somewhat similar: https://bugs.launchpad.net/ubuntu/+s...e/+bug/1100190
 
Old 05-31-2023, 03:20 AM   #44
anmac1789
Member
 
Registered: May 2023
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
This is not the find or zip, it is the filesystem access itself, does not depend on the tool you use (as you could see cat produced the same error). Also you could see (based on the strace output) a simple read caused the i/o error. You might check the logs of webdav (if there were any) to see what's going on. Probably you can find something in /var/log.
this is somewhat similar: https://bugs.launchpad.net/ubuntu/+s...e/+bug/1100190
There are lots of logs in there which should I look at specifically ?

Click image for larger version

Name:	Screenshot from 2023-05-31 04-16-57.jpg
Views:	6
Size:	200.5 KB
ID:	41128
 
Old 05-31-2023, 06:14 AM   #45
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
syslog, messages, kern.log, dmesg, but in general everywhere. Probably webdav has its own logfile somewhere, I don't know how is it configured.
 
  


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
[SOLVED] How can I have zip -d file.zip "__MACOSX*" work on all zip files in directory? thomwblair Linux - Newbie 10 10-08-2018 02:30 PM
Cannot zip a mutli-part archive, zip -FF command failing with out of memory error sanchit.sharma Linux - Newbie 8 05-21-2018 06:47 AM
Using zip to zip the contents of a directory to another? Paradigm6790 Linux - Newbie 2 07-25-2012 11:51 AM
How to find out a file in a WAR which in a zip without unzip the zip-file? thomas2004ch Linux - Software 3 09-30-2011 03:06 PM
Zip gives error "-bash: /usr/bin/zip: Argument list too long" konathamsrinu Programming 3 07-06-2006 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:59 PM.

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