Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 2 | .TH CHATTR 1 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 3 | .SH NAME |
| 4 | chattr \- change file attributes on a Linux second extended file system |
| 5 | .SH SYNOPSIS |
| 6 | .B chattr |
| 7 | [ |
| 8 | .B \-RV |
| 9 | ] |
| 10 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 11 | .B \-v |
| 12 | .I version |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 13 | ] |
| 14 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 15 | .I mode |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 16 | ] |
| 17 | .I files... |
| 18 | .SH DESCRIPTION |
| 19 | .B chattr |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 20 | changes the file attributes on a Linux second extended file system. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 21 | .PP |
Theodore Ts'o | 2ecc6fe | 1997-04-29 17:57:00 +0000 | [diff] [blame] | 22 | The format of a symbolic mode is +-=[ASacdisu]. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 23 | .PP |
| 24 | The operator `+' causes the selected attributes to be added to the |
| 25 | existing attributes of the files; `-' causes them to be removed; and |
| 26 | `=' causes them to be the only attributes that the files have. |
| 27 | .PP |
Theodore Ts'o | 2ecc6fe | 1997-04-29 17:57:00 +0000 | [diff] [blame] | 28 | The letters `ASacdisu' select the new attributes for the files: |
| 29 | don't update atime (A), synchronous updates (S), append only (a), |
| 30 | compressed (c), immutable (i), no dump (d), |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 31 | secure deletion (s), and undeletable (u). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 32 | .SH OPTIONS |
| 33 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 34 | .B \-R |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 35 | Recursively change attributes of directories and their contents. |
Theodore Ts'o | a88fa0c | 1999-01-05 07:02:39 +0000 | [diff] [blame] | 36 | Symbolic links encountered during recursive directory traversals are |
| 37 | ignored. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 38 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 39 | .B \-V |
Theodore Ts'o | a88fa0c | 1999-01-05 07:02:39 +0000 | [diff] [blame] | 40 | Be verbose with chattr's output and print the program version. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 41 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 42 | .BI \-v " version" |
Theodore Ts'o | e1a0a3e | 2000-02-11 05:00:19 +0000 | [diff] [blame] | 43 | Set the file's version/generation number. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 44 | .SH ATTRIBUTES |
Theodore Ts'o | 2ecc6fe | 1997-04-29 17:57:00 +0000 | [diff] [blame] | 45 | When a file with the 'A' attribute set is modified, its atime record is |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 46 | not modified. This avoids a certain amount of disk I/O for laptop |
Theodore Ts'o | 2ecc6fe | 1997-04-29 17:57:00 +0000 | [diff] [blame] | 47 | systems. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 48 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 49 | A file with the `a' attribute set can only be open in append mode for writing. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 50 | Only the superuser can set or clear this attribute. |
| 51 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 52 | A file with the `c' attribute set is automatically compressed on the disk |
| 53 | by the kernel. A read from this file returns uncompressed data. A write to |
| 54 | this file compresses data before storing them on the disk. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 55 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 56 | A file with the `d' attribute set is not candidate for backup when the |
| 57 | .BR dump (8) |
| 58 | program is run. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 59 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 60 | A file with the `i' attribute cannot be modified: it cannot be deleted or |
| 61 | renamed, no link can be created to this file and no data can be written |
| 62 | to the file. Only the superuser can set or clear this attribute. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 63 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 64 | When a file with the `s' attribute set is deleted, its blocks are zeroed and |
| 65 | written back to the disk. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 66 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 67 | When a file with the `S' attribute set is modified, |
| 68 | the changes are written synchronously on the disk; this is equivalent to |
| 69 | the `sync' mount option applied to a subset of the files. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 70 | .PP |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 71 | When a file with the `u' attribute set is deleted, its contents are saved. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 72 | This allows the user to ask for its undeletion. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 73 | .PP |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 74 | .SH AUTHOR |
| 75 | .B chattr |
Theodore Ts'o | ffe4cab | 2000-04-03 13:27:41 +0000 | [diff] [blame] | 76 | was written by Remy Card <Remy.Card@linux.org>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 77 | .SH BUGS AND LIMITATIONS |
Theodore Ts'o | ffe4cab | 2000-04-03 13:27:41 +0000 | [diff] [blame] | 78 | As of Linux 2.2, the `c', 's', and `u' attribute are not honored |
| 79 | by the kernel code. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 80 | .PP |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 81 | These attributes will be implemented in a future ext2 fs version. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 82 | .SH AVAILABILITY |
| 83 | .B chattr |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 84 | is part of the e2fsprogs package and is available for anonymous |
| 85 | ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 86 | .SH SEE ALSO |
| 87 | .BR lsattr (1) |