Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 26, 2013, 09:44 AM   #1
rmger
macrumors newbie
 
Join Date: Jan 2013
lsattr -?

In BSD systems we can set special attributes for files with the command "chflags". This command is also present as in OS X.
In UNIX systems we can see what specials attributes are put on the file with command "lsattr", but this command is not present in OS X. And how now see what are the attributes of the file?

Get a situation that we can set, but can not see what attributes are present.
rmger is offline   0 Reply With Quote
Old Jan 26, 2013, 10:12 AM   #2
pitaya
macrumors member
 
Join Date: Jun 2012
man chflags:
Code:
...
     You can use "ls -lO" to see the flags of existing files.
...
pitaya is offline   0 Reply With Quote
Old Jan 26, 2013, 10:18 AM   #3
rmger
Thread Starter
macrumors newbie
 
Join Date: Jan 2013
Quote:
Originally Posted by pitaya View Post
man chflags:
Code:
...
     You can use "ls -lO" to see the flags of existing files.
...
Excellent!
rmger is offline   0 Reply With Quote
Old Jan 26, 2013, 10:23 AM   #4
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by rmger View Post
In BSD systems we can set special attributes for files with the command "chflags". This command is also present as in OS X.
In UNIX systems we can see what specials attributes are put on the file with command "lsattr", but this command is not present in OS X. And how now see what are the attributes of the file?

Get a situation that we can set, but can not see what attributes are present.
MacOS X is fully POSIX 2003 compliant. MacOS X _is_ Unix. Therefore either "lsattr" is available on MacOS X, or it is _not_ available on all Unix implementations. Turns out that lsattr is a Linux and AIX command, not Unix, which Google would have told you.

And instead of posting here, open terminal, enter "man chflags", and read what it says.
gnasher729 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

All times are GMT -5. The time now is 09:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC