Meaning of starting d and starting l in drwxr-xr-x and lrwxr-xr-x

1

There are two files with the permission strings drwxr-xr-x and lrwxr-xr-x.

I was wondering what the starting d and starting l stand for?

Sun

Posted 2015-11-13T19:38:39.317

Reputation: 137

The ACL indicator is the character after the file permissions. – glenn jackman – 2015-11-13T19:48:35.167

Thanks for pointing this out. I've corrected the question. – Sun – 2015-11-13T19:53:44.567

1

Detailed information at https://www.gnu.org/software/coreutils/manual/html_node/What-information-is-listed.html (assuming your OS uses GNU tools)

– glenn jackman – 2015-11-13T20:05:29.447

Answers

9

The d stands for directory. The l stands for symbolic link.

The first character in the permissions string has nothing to do with permissions. It simply identifies what kind of object it is.

Wes Sayeed

Posted 2015-11-13T19:38:39.317

Reputation: 12 024

Shouldn't "object" be replaced with "file" since everything in Linux is a file? Good answer though. – Jonny Henly – 2015-11-13T21:11:45.923

2Meh. Semantics I suppose. If we really wanted to be pedantic we'd call them "nodes" :-) Linux is kind of inconsistent. If you cp or mv a link with no arguments, it copies the link itself, not the thing it references. But if you tried to cp or mv a device node (i.e. in the /dev directory), it would copy the thing it references, not the node itself. Internally the filesystem uses "nodes" to reference everything. You can treat everything as though it were a "file". But to a programmer, everything (including memory) is an object of some kind. So I guess it just depends on context. – Wes Sayeed – 2015-11-13T21:46:55.007

Touché about "nodes" and you're right about everything being considered an object of some type. – Jonny Henly – 2015-11-13T22:57:31.887

0

"d" means the file is a directory (folder)

"l" means the file is symbolic link (shortcut)

JCM

Posted 2015-11-13T19:38:39.317

Reputation: 93

Did you read the answer above? @Wes Sayeed already gave the (same) answer! – Sun – 2015-11-15T01:21:52.660

Oh. Anyway, I felt like proving my own two cents since I've dabbling with *nix OSes. Sheesh! ;-) – JCM – 2015-11-15T01:25:39.597