1

I have a zip file, sample.zip, which contains a PDF whose name is too long. I tried to unzip it in Ubuntu terminal through

unzip sample.zip

however, it shows an error that "File name too long". Is there a way to tackle this issue? For example, is there any way to rename the content of the zip file (which in this case is a PDF) without extracting it? If yes, then I may rename it and extract it later.

1
  • Curiosity. The standard file systems I'm familiar all have a file name length limitation of 255 bytes. Where was the zip file created with the extra-long name? Commented May 25, 2022 at 19:20

1 Answer 1

2

You can unzip the file to a pipe and redirect the output to a new file.

unzip -p sample.zip > new.pdf

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.