lsattr -?

Discussion in 'Mac Programming' started by rmger, Jan 26, 2013.

  1. macrumors newbie

    Joined:
    Jan 26, 2013
    #1
    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.
     
  2. macrumors member

    Joined:
    Jun 17, 2012
    #2
    man chflags:
    Code:
    ...
         You can use "ls -lO" to see the flags of existing files.
    ...
     
  3. thread starter macrumors newbie

    Joined:
    Jan 26, 2013
    #3
    Excellent!
     
  4. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    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.
     

Share This Page