Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 3 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
add comment

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
add comment

Your Answer

 
discard

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.