Problem finding my folder via terminal

Gregory Ewing greg.ewing at canterbury.ac.nz
Sat Jun 9 03:45:16 EDT 2018


Gene Heskett wrote:

> Finder, if thats what you are using, I am not familiar with it, is 
> probably showing you that which it has cached, before that folder was 
> created.

The Finder is usually pretty good at noticing things like that.
I just tried creating a directory using a shell command while
the Finder was displaying the containing folder, and it appeared
immediately.

MacOSX has a "hidden" attribute that stops things showing up
in the Finder. You can check for that using:

ls -ldO /Users/TamaraB/Desktop/mymodules

ls -ldO /Users/TamaraB/Desktop/mymodules/mymodules

(note that's a capital letter O in the options).

If the hidden flag is set on either of those, it will show
up as "hidden" in the ls listing. Here's an example from my
system:

% ls -ldO newfolder2
drwxr-xr-x@ 2 greg  staff  hidden 68  9 Jun 19:32 newfolder2
                            ^^^^^^

As for *how* you ended up with an extra folder (and how it
came to be hidden, if it really is) there's no way to be sure.

One way you can end up with extra folders is by unpacking zip
files. MacOSX's unzipping utility will create a folder for the
unzipped contents if the zip file contains more than just a
single folder at the top level. So if you created a folder
called "mymodules" and then unzipped a file called
"mymodules.zip" into it, you would get what you have here
(except that nothing would be hidden).

-- 
Greg




More information about the Python-list mailing list