[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to compare one folder to one directory




On 11/3/23 06:17, Greg Wooledge wrote:
On Thu, Nov 02, 2023 at 12:16:54PM -0500, John Hasler wrote:
This was in the 1970s when the graphical UI was being invented.  The
idea was that the screen was to look like an actual desktop which might
have actual file folders on it.  Every icon was supposed to be an image
of a familiar office object.  In that context a directory is a phone
book.
The use of "directory" in the Unix sense predates graphical UI
development.  It's called a directory because that's how it works,
and how it looks when you examine it at a low level.

[...]
But the real problem with calling them "folders" is that it doesn't
match the Unix user interface.  The command to make one is mkdir(1),
not mkfolder.  To remove one, rmdir(1).  When you use "ls -l", a
directory is indicated by the letter "d", not "f".  When you want
find(1) to act upon directories, you use "-type d".  The "-type f"
option is for regular files, not folders.  In C, you change directory
by calling chdir(2).  In a shell, it's "cd".

I agree that

- cd : change directory
- pwd : print working directory
- mkdir : make directory
- ...

For those reasons, I call it "directory".



--


Reply to: