Lines Matching refs:chattr
7 # chattr - Testcases
14 testing "chattr [-/+]i FILE[write]" "$IN && echo "$_t" > testFile &&
15 chattr +i testFile && lsattr testFile && echo "$_t" > testFile;
16 chattr -i testFile; rm -rf testFile; $OUT " "----i-------- testFile\n" "" ""
17 testing "chattr [-/+]i FILE[re-write]" "$IN && echo "$_t" > testFile &&
18 chattr +i testFile && echo \"$_t\" > testFile || chattr -i testFile &&
21 testing "chattr [-/+]i FILE[append]" "$IN && echo "$_t" > testFile &&
22 chattr +i testFile && echo \"$_t\" >> testFile || lsattr testFile &&
23 chattr -i testFile; rm -rf testFile; $OUT" "----i-------- testFile\n" "" ""
24 testing "chattr [-/+]i FILE[move]" "$IN && echo "$_t" > testFile &&
25 chattr +i testFile && mv testFile testFile1 || lsattr testFile &&
26 chattr -i testFile; rm -rf testFile; $OUT" "----i-------- testFile\n" "" ""
27 testing "chattr [-/+]i FILE[delete]" "$IN && echo "$_t" > testFile &&
28 chattr +i testFile && rm -f testFile || lsattr testFile &&
29 chattr -i testFile; rm -rf testFile; $OUT" "----i-------- testFile\n" "" ""
30 testing "chattr [-/+]i FILE[read]" "$IN && echo "$_t" > testFile &&
31 chattr +i testFile && cat testFile && lsattr testFile &&
32 chattr -i testFile; rm -rf testFile; $OUT" "$_t\n----i-------- testFile\n" "" ""
33 testing "chattr [-/+]a FILE[write]" "$IN && echo "$_t" > testFile &&
34 chattr +a testFile && echo $_t > testFile || lsattr testFile &&
35 chattr -a testFile; rm -rf testFile; $OUT" "-----a------- testFile\n" "" ""
36 testing "chattr [-/+]a FILE[re-write]" "$IN && echo "$_t" > testFile &&
37 chattr +a testFile && echo $_t > testFile || lsattr testFile &&
38 chattr -a testFile && echo $_t > testFile && cat testFile &&
41 testing "chattr [-/+]a FILE[append]" "$IN && echo "$_t" > testFile &&
42 chattr +a testFile && echo $_t >> testFile && cat testFile &&
43 lsattr testFile && chattr -a testFile; rm -rf testFile; $OUT" \
45 testing "chattr [-/+]a FILE[move]" "$IN && echo "$_t" > testFile &&
46 chattr +a testFile && mv testFile testFile1 || lsattr testFile &&
47 chattr -a testFile; rm -rf testFile; $OUT" "-----a------- testFile\n" "" ""
48 testing "chattr [-/+]a FILE[delete]" "$IN && echo "$_t" > testFile &&
49 chattr +a testFile && rm -f testFile || lsattr testFile &&
50 chattr -a testFile; rm -rf testFile; $OUT" "-----a------- testFile\n" "" ""
51 testing "chattr [-/+]a FILE[read]" "$IN && echo "$_t" > testFile &&
52 chattr +a testFile && cat testFile && lsattr testFile && chattr -a testFile;
57 testing "chattr [-/+]$attr FILE" "$IN && echo "$_t" > testFile &&
58 chattr +$attr testFile && cat testFile && chattr -$attr testFile &&
64 testing "chattr -$attr FILE" "$IN && echo "$_t" > testFile && chattr -$attr testFile &&
68 testing "chattr [-/+]AacDdijsStTu FILE" "$IN && echo "$_t" > testFile &&
69 chattr +AacDdijsStTu testFile && cat testFile && chattr -AacDdijsStTu testFile &&
71 testing "chattr [-/+]AacDdijsStTu(random) FILE" \
73 chattr +AacDdijsStTu testFile && cat testFile && chattr -A testFile &&
74 chattr -a testFile && chattr -c testFile && chattr -D testFile &&
75 chattr -d testFile && chattr -i testFile && chattr -j testFile &&
76 chattr -s testFile && chattr -S testFile && chattr -t testFile &&
77 chattr -T testFile && chattr -u testFile && lsattr testFile &&
78 chattr -AacDdijsStTu testFile; rm -rf testFile; $OUT" \
80 testing "chattr [-/+]AacDdijsStTu FILE*" "$IN &&
87 chattr +AacDdijsStTu testFile* &&
88 cat testFile9 && chattr -AacDdijsStTu testFile* && lsattr testFile*; rm -rf testFile*; $OUT" \
90 testing "chattr [-/+]AacDdijsStTu(random) FILE*" \
92 chattr +AacDdijsStTu testFile* && cat testFile && chattr -A testFile* &&
93 chattr -a testFile* && chattr -c testFile* && chattr -D testFile* &&
94 chattr -d testFile* && chattr -i testFile* && chattr -j testFile* &&
95 chattr -s testFile* && chattr -S testFile* && chattr -t testFile* &&
96 chattr -T testFile* && chattr -u testFile* && lsattr testFile;
99 testing "chattr [-/+]i FILE[write]" \
101 chattr +i testFile &&
102 echo \"$_t\" > testFile || lsattr testFile && chattr -i testFile;
104 testing "chattr [-/+]A FILE[write]" \
105 "$IN && echo "$_t" > testFile && chattr +A testFile &&
106 echo \"$_t\" > testFile && lsattr testFile && chattr -A testFile;
108 testing "chattr [-/+]s FILE[write]" \
109 "$IN && echo "$_t" > testFile && chattr +s testFile &&
110 echo \"$_t\" > testFile && lsattr testFile && chattr -s testFile
112 testing "chattr -v version FILE[write]" \
114 chattr -v 1234 testFile && echo \"$_t\" > testFile &&
119 testing "chattr -R [-/+]a FILE" "$IN && touch aa && chattr -R +A aa && lsattr aa &&
120 chattr -R -A aa; rm -rf aa; $OUT" "$_a aa\n" "" ""
121 testing "chattr -R [-/+]a FILE.." "$IN && touch aa bb &&
122 chattr -R +A aa bb && lsattr aa bb &&
123 chattr -R -A aa bb; rm -rf aa bb; $OUT" "$_a aa\n$_a bb\n" "" ""
130 chattr +A file &>/dev/null
149 testing "lsattr -v file" "chattr -v $_v * && lsattr -v file" \
151 testing "lsattr -v file_path" "chattr -v $_v * && lsattr -v $_p/file" \
153 testing "lsattr -Radlv file1 file2" "chattr -v $_v * &&
158 chattr -AacDdijsStTu file && cd ..