Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to see a file's flags, such as hidden, schg, etc? I've got an rwxrwxrwx file that I can't edit, and I think a flag might be responsible.

share|improve this question
up vote 2 down vote accepted

I assume you are talking about FreeBSD - from man ls:

 -o      Include the file flags in a long (-l) output.

So ls -lo should list all the file flags on FreeBSD.

share|improve this answer
Using Mac OSX, but works the same. Thanks! – tkbx Aug 8 '12 at 0:34

On OS X 10.8, this seems to be ls -lO now (with a capital O). The output from man ls:

-O      Include the file flags in a long (-l) output.
-o      List in long format, but omit the group id.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.