📄 directories.mht
字号:
#
# /etc/ssh_random_seed
#
#12640 0644 1 root wheel 10104 Mon May 25 7:39:19 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/ld.so.cache
#
#12626 0664 1 root wheel 12288 Sun May 24 19:23:08 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/psdevtab
#
#12304 0644 1 root root 237 Sun May 24 13:59:33 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/exports
#
#12309 0644 1 root root 3386 Sun May 24 13:24:33 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/inetd.conf
#
#12399 0644 1 root root 30205 Sun May 24 10:08:37 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/sendmail.cf
#
#18774 0644 1 gnat perldoc 2199 Sun May 24 9:35:57 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/X11/XMetroconfig
#
#12636 0644 1 root wheel 290 Sun May 24 9:05:40 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/mtab
#
#12627 0640 1 root root 0 Sun May 24 8:24:31 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/wtmplock
#
#12310 0644 1 root tchrist 65 Sun May 24 8:23:04 =
1998</FONT><FONT color=3D#43cd80> </FONT><FONT color=3D#bebebe>
#
# /etc/issue
#
#....
#-----------------------------
# <FONT size=3D-1><A =
href=3D"http://pleac.sourceforge.net/include/perl/ch09/lst">download the =
following standalone program</A></FONT>
#!/usr/bin/perl
# lst - list sorted directory contents (depth first)
</FONT>
<FONT color=3D#ffa500>use</FONT> <FONT =
color=3D#b2dfee>Getopt::Std</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#ffa500>use</FONT> <FONT =
color=3D#b2dfee>File::Find</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#ffa500>use</FONT> File::<FONT =
color=3D#98fb98>stat</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#ffa500>use</FONT> <FONT =
color=3D#b2dfee>User::pwent</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#ffa500>use</FONT> <FONT =
color=3D#b2dfee>User::grent</FONT><FONT color=3D#00ffff>;</FONT>
getopts<FONT color=3D#00ffff>(</FONT><FONT =
color=3D#00cd00>'lusrcmi'</FONT><FONT color=3D#00ffff>)</FONT> =
<FONT color=3D#98fb98>or</FONT> <FONT color=3D#ffa500>die</FONT> =
<<DEATH<FONT color=3D#00ffff>;</FONT>
Usage: $<FONT color=3D#cdcd00>0</FONT> <FONT =
color=3D#00ffff>[</FONT>-mucsril<FONT color=3D#00ffff>]</FONT> <FONT =
color=3D#00ffff>[</FONT>dirs ...<FONT color=3D#00ffff>]</FONT>
<FONT color=3D#98fb98>or</FONT> $<FONT color=3D#cdcd00>0</FONT> -i =
<FONT color=3D#00ffff>[</FONT>-mucsrl<FONT color=3D#00ffff>]</FONT> < =
filelist
Input <FONT color=3D#ff7f50>format</FONT>:
-i <FONT color=3D#98fb98>read</FONT> pathnames from stdin
Output <FONT color=3D#ff7f50>format</FONT>:
<FONT color=3D#b2dfee>-l</FONT> long listing
Sort on:
-<FONT color=3D#ff7f50>m</FONT> <FONT color=3D#ffa500>use</FONT> =
<FONT color=3D#b2dfee>mtime</FONT> <FONT color=3D#00ffff>(</FONT>modify =
<FONT color=3D#98fb98>time</FONT><FONT color=3D#00ffff>)</FONT> <FONT =
color=3D#00ffff>[</FONT>DEFAULT<FONT color=3D#00ffff>]</FONT>
<FONT color=3D#b2dfee>-u</FONT> <FONT color=3D#ffa500>use</FONT> =
<FONT color=3D#b2dfee>atime</FONT> <FONT color=3D#00ffff>(</FONT>access =
<FONT color=3D#98fb98>time</FONT><FONT color=3D#00ffff>)</FONT>
<FONT color=3D#b2dfee>-c</FONT> <FONT color=3D#ffa500>use</FONT> =
<FONT color=3D#b2dfee>ctime</FONT> <FONT color=3D#00ffff>(</FONT>inode =
change <FONT color=3D#98fb98>time</FONT><FONT color=3D#00ffff>)</FONT>
<FONT color=3D#b2dfee>-</FONT><FONT color=3D#ff7f50>s</FONT> <FONT =
color=3D#ffa500>use</FONT> <FONT color=3D#b2dfee>size</FONT> <FONT =
color=3D#ffa500>for</FONT> sorting
<FONT color=3D#ff7f50>Ordering:</FONT>
<FONT color=3D#b2dfee>-r</FONT> <FONT =
color=3D#98fb98>reverse</FONT> <FONT color=3D#ff7f50>sort</FONT>
NB: You may only <FONT color=3D#ffa500>use</FONT> <FONT =
color=3D#98fb98>select</FONT> one sorting option at a <FONT =
color=3D#98fb98>time</FONT>.
DEATH
<FONT color=3D#43cd80> </FONT>
<FONT color=3D#ffa500>unless</FONT> <FONT color=3D#00ffff>(</FONT>$opt_i =
|| <FONT color=3D#cdad00>@ARGV</FONT><FONT color=3D#00ffff>)</FONT> =
<FONT color=3D#00ffff>{</FONT> <FONT color=3D#cdad00>@ARGV</FONT> =3D =
<FONT color=3D#00ffff>(</FONT><FONT color=3D#00cd00>'.'</FONT><FONT =
color=3D#00ffff>)</FONT> <FONT color=3D#00ffff>}</FONT>
<FONT color=3D#ffa500>if</FONT> <FONT color=3D#00ffff>(</FONT>$opt_c + =
$opt_u + $opt_<FONT color=3D#ff7f50>s</FONT> + $opt_<FONT =
color=3D#ff7f50>m</FONT> > <FONT color=3D#cdcd00>1</FONT><FONT =
color=3D#00ffff>)</FONT> <FONT color=3D#00ffff>{</FONT>
<FONT color=3D#ffa500>die</FONT> <FONT color=3D#00cd00>"can only =
sort on one time or size"</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#00ffff>}</FONT>
$IDX =3D <FONT color=3D#00cd00>'mtime'</FONT><FONT =
color=3D#00ffff>;</FONT>
$IDX =3D <FONT color=3D#00cd00>'atime'</FONT> <FONT =
color=3D#ffa500>if</FONT> $opt_u<FONT color=3D#00ffff>;</FONT>
$IDX =3D <FONT color=3D#00cd00>'ctime'</FONT> <FONT =
color=3D#ffa500>if</FONT> $opt_c<FONT color=3D#00ffff>;</FONT>
$IDX =3D <FONT color=3D#00cd00>'size'</FONT> <FONT =
color=3D#ffa500>if</FONT> $opt_<FONT color=3D#ff7f50>s</FONT><FONT =
color=3D#00ffff>;</FONT>
$TIME_IDX =3D $opt_<FONT color=3D#ff7f50>s</FONT> ? <FONT =
color=3D#00cd00>'mtime'</FONT> : $IDX<FONT color=3D#00ffff>;</FONT>
*name =3D *File::Find::name<FONT color=3D#00ffff>;</FONT> <FONT =
color=3D#bebebe># forcibly import that variable
</FONT>
<FONT color=3D#bebebe># the $opt_i flag tricks wanted into taking
# its filenames from ARGV instead of being
# called from find.
</FONT>
<FONT color=3D#ffa500>if</FONT> <FONT =
color=3D#00ffff>(</FONT>$opt_i<FONT color=3D#00ffff>)</FONT> <FONT =
color=3D#00ffff>{</FONT>
*name =3D *_<FONT color=3D#00ffff>;</FONT> <FONT color=3D#bebebe># =
$name now alias for $_
</FONT> <FONT color=3D#ffa500>while</FONT> <FONT =
color=3D#00ffff>(</FONT><><FONT color=3D#00ffff>)</FONT> <FONT =
color=3D#00ffff>{</FONT> <FONT color=3D#ff7f50>chomp</FONT><FONT =
color=3D#00ffff>;</FONT> &wanted<FONT color=3D#00ffff>;</FONT> <FONT =
color=3D#00ffff>}</FONT> <FONT color=3D#bebebe># ok, not stdin really
</FONT><FONT color=3D#00ffff>}</FONT> <FONT color=3D#ffa500>else</FONT> =
<FONT color=3D#00ffff>{</FONT>
find<FONT color=3D#00ffff>(</FONT>\&wanted, <FONT =
color=3D#cdad00>@ARGV</FONT><FONT color=3D#00ffff>);</FONT>
<FONT color=3D#00ffff>}</FONT>
<FONT color=3D#bebebe># sort the files by their cached times, youngest =
first
</FONT><FONT color=3D#cdad00>@skeys</FONT> =3D <FONT =
color=3D#ff7f50>sort</FONT> <FONT color=3D#00ffff>{</FONT> <FONT =
color=3D#cdcd00>$time</FONT><FONT color=3D#00ffff>{</FONT>$b<FONT =
color=3D#00ffff>}</FONT> <=3D> <FONT =
color=3D#cdcd00>$time</FONT><FONT color=3D#00ffff>{</FONT>$a<FONT =
color=3D#00ffff>}</FONT> <FONT color=3D#00ffff>}</FONT> <FONT =
color=3D#ff7f50>keys</FONT> <FONT color=3D#cdcd00>%time</FONT><FONT =
color=3D#00ffff>;</FONT>
<FONT color=3D#bebebe># but flip the order if -r was supplied on command =
line
</FONT><FONT color=3D#cdad00>@skeys</FONT> =3D <FONT =
color=3D#98fb98>reverse</FONT> <FONT color=3D#cdad00>@skeys</FONT> <FONT =
color=3D#ffa500>if</FONT> $opt_r<FONT color=3D#00ffff>;</FONT>
<FONT color=3D#ffa500>for</FONT> <FONT color=3D#00ffff>(</FONT><FONT =
color=3D#cdad00>@skeys</FONT><FONT color=3D#00ffff>)</FONT> <FONT =
color=3D#00ffff>{</FONT>
<FONT color=3D#ffa500>unless</FONT> <FONT =
color=3D#00ffff>(</FONT>$opt_l<FONT color=3D#00ffff>)</FONT> <FONT =
color=3D#00ffff>{</FONT> <FONT color=3D#bebebe># emulate ls -l, except =
for permissions
</FONT> <FONT color=3D#ff7f50>print</FONT> <FONT =
color=3D#00cd00>"$_\n"</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#ffa500>next</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#00ffff>}</FONT>
$now =3D <FONT color=3D#98fb98>localtime</FONT> <FONT =
color=3D#cdcd00>$stat</FONT><FONT color=3D#00ffff>{</FONT>$_<FONT =
color=3D#00ffff>}</FONT>->$TIME_IDX<FONT color=3D#00ffff>();</FONT>
<FONT color=3D#ff7f50>printf</FONT> <FONT color=3D#00cd00>"%6d %04o =
%6d %8s %8s %8d </FONT><FONT color=3D#cdcd00>%s</FONT><FONT =
color=3D#00cd00> </FONT><FONT color=3D#cdcd00>%s</FONT><FONT =
color=3D#00cd00>\n"</FONT>,
<FONT color=3D#cdcd00>$stat</FONT><FONT =
color=3D#00ffff>{</FONT>$_<FONT color=3D#00ffff>}</FONT>->ino<FONT =
color=3D#00ffff>()</FONT>,
<FONT color=3D#cdcd00>$stat</FONT><FONT =
color=3D#00ffff>{</FONT>$_<FONT color=3D#00ffff>}</FONT>->mode<FONT =
color=3D#00ffff>()</FONT> & <FONT color=3D#cdcd00>07777</FONT>,
<FONT color=3D#cdcd00>$stat</FONT><FONT =
color=3D#00ffff>{</FONT>$_<FONT color=3D#00ffff>}</FONT>->nlink<FONT =
color=3D#00ffff>()</FONT>,
user<FONT color=3D#00ffff>(</FONT><FONT =
color=3D#cdcd00>$stat</FONT><FONT color=3D#00ffff>{</FONT>$_<FONT =
color=3D#00ffff>}</FONT>->uid<FONT color=3D#00ffff>())</FONT>,
group<FONT color=3D#00ffff>(</FONT><FONT =
color=3D#cdcd00>$stat</FONT><FONT color=3D#00ffff>{</FONT>$_<FONT =
color=3D#00ffff>}</FONT>->gid<FONT color=3D#00ffff>())</FONT>,
<FONT color=3D#cdcd00>$stat</FONT><FONT =
color=3D#00ffff>{</FONT>$_<FONT color=3D#00ffff>}</FONT>->size<FONT =
color=3D#00ffff>()</FONT>,
$now, $_<FONT color=3D#00ffff>;</FONT>
<FONT color=3D#00ffff>}</FONT>
<FONT color=3D#bebebe># get stat info on the file, saving the desired
# sort criterion (mtime, atime, ctime, or size)
# in the </FONT><FONT color=3D#cdcd00>%time</FONT><FONT color=3D#bebebe> =
hash indexed by filename.
# if they want a long list, we have to save the
# entire stat object in </FONT><FONT color=3D#cdcd00>%stat</FONT><FONT =
color=3D#bebebe>. yes, this is a
# hash of objects
</FONT><FONT color=3D#ffa500>sub</FONT> <FONT =
color=3D#b2dfee>wanted</FONT> <FONT color=3D#00ffff>{</FONT>
<FONT color=3D#ffa500>my</FONT> <FONT color=3D#9ac0cd>$sb</FONT> =3D =
<FONT color=3D#98fb98>stat</FONT><FONT color=3D#00ffff>(</FONT>$_<FONT =
color=3D#00ffff>);</FONT> <FONT color=3D#bebebe># XXX: should be stat =
or lstat?
</FONT> <FONT color=3D#ffa500>return</FONT> <FONT =
color=3D#ffa500>unless</FONT> $sb<FONT color=3D#00ffff>;</FONT>
<FONT color=3D#cdcd00>$time</FONT><FONT =
color=3D#00ffff>{</FONT>$name<FONT color=3D#00ffff>}</FONT> =3D =
$sb->$IDX<FONT color=3D#00ffff>();</FONT> <FONT color=3D#bebebe># =
indirect method call
</FONT> <FONT color=3D#cdcd00>$stat</FONT><FONT =
color=3D#00ffff>{</FONT>$name<FONT color=3D#00ffff>}</FONT> =3D $sb =
<FONT color=3D#ffa500>if</FONT> $opt_l<FONT color=3D#00ffff>;</FONT>
<FONT color=3D#00ffff>}</FONT>
<FONT color=3D#bebebe># cache user number to name conversions
</FONT><FONT color=3D#ffa500>sub</FONT> <FONT =
color=3D#b2dfee>user</FONT> <FONT color=3D#00ffff>{</FONT>
<FONT color=3D#ffa500>my</FONT> <FONT color=3D#9ac0cd>$uid</FONT> =
=3D <FONT color=3D#ff7f50>shift</FONT><FONT color=3D#00ffff>;</FONT>
<FONT color=3D#cdcd00>$user</FONT><FONT =
color=3D#00ffff>{</FONT>$uid<FONT color=3D#00ffff>}</FONT> =3D <FONT =
color=3D#98fb98>getpwuid</FONT><FONT color=3D#00ffff>(</FONT>$uid<FONT =
color=3D#00ffff>)</FONT>->name || <FONT =
color=3D#00cd00>"#$uid"</FONT>
<FONT color=3D#ffa500>unless</FONT> <FONT =
color=3D#ff7f50>defined</FONT> <FONT color=3D#cdcd00>$user</FONT><FONT =
color=3D#00ffff>{</FONT>$uid<FONT color=3D#00ffff>};</FONT>
<FONT color=3D#ffa500>return</FONT> <FONT =
color=3D#cdcd00>$user</FONT><FONT color=3D#00ffff>{</FONT>$uid<FONT =
color=3D#00ffff>};</FONT>
<FONT color=3D#00ffff>}</FONT>
<FONT color=3D#bebebe># cache group number to name conversions
</FONT><FONT color=3D
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -