Lsattr

Share on Facebook Share on Twitter Email

lsattr is a command-line program for listing the attributes on a Linux second extended file system (ext2).[1] It is also a command to display attributes of devices on an AIX operating system.[2]

Options

The form of the lsattr command (gnu 1.41.3):

 lsattr [ -RVadv ] [ files...  ]
  • -R Recursively list attributes of directories and their contents.
  • -V Display the program version.
  • -a List all files in directories, including files that start with '.'
  • -d List directories like other files, rather than listing their contents.
  • -v List the file’s version/generation number.

Attributes

Some attributes include:

  • don't update atime (A)
  • synchronous updates (S)
  • synchronous directory updates (D)
  • append only (a)
  • compressed (c)
  • no dump (d)
  • immutable (i)
  • data journaling (j)
  • secure deletion (s)
  • top of directory hierarchy (T)
  • no tail-merging (t)
  • undeletable (u)
  • use hashed b-trees for directory lookups (I)
Details of the attributes can be found in the chattr man page [3]

Example output on AIX

Example output of lsattr -El hdisk10:[4]

# lsattr -El hdisk10
clr_q         yes                Device CLEARS its Queue on error True
location                         Location Label                   True
lun_id        0x3e000000000000   Logical Unit Number ID           False
lun_reset_spt yes                FC Forced Open LUN               True
max_transfer  0x40000            Maximum TRANSFER Size            True
node_name     0x5006048ad52e3f66 FC Node Name                     False
pvid          none               Physical volume identifier       False
q_err         no                 Use QERR bit                     True
q_type        simple             Queue TYPE                       True
queue_depth   16                 Queue DEPTH                      True
reserve_lock  yes                Reserve Device on open           True
rw_timeout    40                 READ/WRITE time out value        True
scsi_id       0xd40018           SCSI ID                          False
start_timeout 180                START UNIT time out value        True
ww_name       0x5006048ad52e3f66 FC World Wide Name               False

See also

References

  1. ^ lsattr man
  2. ^ [1]
  3. ^ chattr man
  4. ^ Example output of lsattr

Post a question - any question - to the WikiAnswers community:

Copyrights:

Mentioned in

Timex (Unix)
Paste (Unix)
Id (Unix)