هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
طريقة الكتابة
lsattr [-RVadlpv] [FILE]...الخيارات 7
الأكثر استخدامًا
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 10
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Attributes of one file
lsattr /etc/resolv.conf ---------------------- /etc/resolv.confNo attributes set.
2Long names
lsattr -l /var/log/app/audit.log /var/log/app/audit.log Append_OnlyEasier to read.
3A directory itself
lsattr -d /srv/archiveWithout -d you see the files inside.
4All files, also hidden ones
lsattr -a ~Includes .bashrc and others.
5Search a tree for immutable files
lsattr -R /etc 2>/dev/null | grep -- '-i-'Explains failing updates or config tools.
6Check SSH files for attacker tricks (security)
lsattr /root/.ssh/authorized_keys /home/*/.ssh/authorized_keysion authorized_keys can hide a backdoor key.7Check before a package update
lsattr /usr/bin/* 2>/dev/null | grep -v -- '^-*e*-* 'Any attribute other than e (extents) is unusual in /usr/bin.
8Show the project number
lsattr -p /srv/projectsUsed with project quotas on ext4/XFS.
9Compare with ls
ls -l /etc/resolv.conf; lsattr /etc/resolv.confls shows the mode; lsattr shows the attributes.
10Errors on special files
lsattr /dev/null lsattr: Operation not supported While reading flags on /dev/nullOnly normal files and folders have attributes.
لا يوجد شيء يطابق هذا الفلتر.
رموز الخروج
0 | Done. |
1 | Error. |