Something bad happened and my Linux root user couldn’t ls. I’ll show you to the codes:

The first thing I thought is permissions. But wait, I’m root. I own this joint. What is really going on here?

It’s always good to go back to recent events when troubleshooting. Lucky for me, I know what happened shortly before I got this error. I got in a fight with svn and ended up re-checking out my svn repo. That fight with .svn is beyond the scope of this blog post. What I did when I re-checked out my svn repo was effectively create a new directory with the same name in the same place and this upset my terminal. Apparently, two directories with the same path are not equivalent. That’s tough to wrap your mind around because you know that as a directory with a path. Behind the scenes, the OS knows them as inodes.

To fix the issue, simply close out any terminals that reference the old inode. If you want to get fancy, I suppose you could remount the directory. Mounting and remounting is beyond the scope of this blog post.

DO try this at home:

Notice how in screen 0 the directory is empty and in screen 1 it contains bar. It really amazes me the things I learn about the deep workings of files in the file business.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditBuffer this pagePrint this pageEmail this to someone

Related Posts

Related Topics & Tags: Quick Tips

About Ryan Johnston

As an Interactive Web Engineer at SmartFile, I mostly work with JavaScript and a little Python. Since we "eat our own dog food" here, I have quite a bit of experience using the SmartFile API that powers the User Interface in the SmartFile Web Application.

Leave a Reply

Your email address will not be published. Required fields are marked *