0
$ ls Downloads ls: reading directory 'Downloads': Invalid argument 

How can I ever again access my precious Downloads directory? I've got something important in there!

What next, a ransom note? I've got work to do. No time for fun and games.

Seen on ChromeOS.

1 Answer 1

0

Do not panic. You have saved a file with too long a name.

$ ls Downloads/|wc -l 596 $ touch Downloads/$(perl -we 'print 8 x 255') $ ls Downloads/|wc -l ls: reading directory 'Downloads/': Invalid argument 0 $ rm Downloads/$(perl -we 'print 8 x 255') $ ls Downloads/|wc -l 596 

So simply remove the file with too long a name, as shown above.

But I cannot do ls, so I cannot see what name to remove!

You didn't remember what the filename was?

I did, but it was so long, I don't remember each word.

Well, OK, go into the ChromeOS files app, you can still find it there, and remove or rename it to something shorter.

Thanks! You're a lifesaver!

In fact people told them their OS had a problem.

I'll try to tell them again.

You are so cool, but when I tried 8 x 256 it said "File name too long" so couldn't recreate the problem.

Ah, at 256 ChromeOS's 2nd layer of protection prevents you from recreating the bug. Note I used 255.

Amazing. So the danger zone is somewhere between 2xx and 255?

Probably. Maybe even 1xx..255. Let's give others a chance to find the lower limit of the danger zone.

Yeah! Got it! Hey wait. Why did I suddenly get into this life threatening mess?

You probably saved some long_webpage_name.mhtml . Yes, ChromeOS clips the name at 256, but as you see that still leaves Linux ls unusable! One would expect a better product from such a large company.

So next time when browsing the web with Chrome on ChromeOS, think long and hard when hitting CTRL+S about what your uncle Dan told you the bug we discussed.

Sure will!

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.