Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do characters like "drwx--xr-x" mean in the output of "ls"? [closed]

Can someone explain to me what the drwx... lines mean? As I understood starting with d is directory and with - (dash) is a normal file. Can someone confirm and help me understand what files I should create? I am so sorry if this wastes your time but I really got stuck.

the question part is in red rectangle

like image 670
mertajvaz Avatar asked Oct 19 '25 07:10

mertajvaz


1 Answers

These show you the file permissions, as can bee seen in nearly any unix system represented this way. The first character tells you if it is a directory (marked as ‚d‘), then you continue in groups of three for read (‚r‘), write (‚w’) and execute (‚x’) permissions for the owning user, group and everyone else.

In your example, the second entry is no directory (first position is ´-´), the owning user, which is ‚login‘, has read write and execute permissions. The owning group is ‚wheel‘ and can only execute, however everyone can read.

As this is basic stuff, you can find plenty of information about file permissions on unix/linux/whatever on the net.

IMHO the Arch-Wiki has a good overview for beginners:

Arch Wiki - File permissions

like image 182
dfuchs Avatar answered Oct 21 '25 12:10

dfuchs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!