📄 file-info.sh
字号:
#!/bin/bash# fileinfo.shFILES="/usr/sbin/accept/usr/sbin/pwck/usr/sbin/chroot/usr/bin/fakefile/sbin/badblocks/sbin/ypbind" # List of files you are curious about. # Threw in a dummy file, /usr/bin/fakefile.echofor file in $FILESdo if [ ! -e "$file" ] # Check if file exists. then echo "$file does not exist."; echo continue # On to next. fi ls -l $file | awk '{ print $9 " file size: " $5 }' # Print 2 fields. whatis `basename $file` # File info. # Note that the whatis database needs to have been set up for this to work. # To do this, as root run /usr/bin/makewhatis. echodone exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -