linux学习日记二 在线求助man page

番茄系统家园 · 2022-10-31 08:33:54

===一个典型的man page===

man date

DATE(1) User Commands DATE(1)

# 请注意上面括号内的数字

NAME
date – print or set the system date and time

SYNOPSIS
date [OPTION]… [+FORMAT]

date [-u|--utc|--universal] [MMddhhmm [[CC]YY] [.ss]]

DESCRIPTION
Display the current time in the given FORMAT, or set the system date.

-d, –date=STRING
display time described by SPRING, not 'now'

-f, –file=DATEFILE

like –date once for each line of DATEFILE

………中间省略……..

ENVIRONMENT
TZ Specifies the timezone, unless overridden by command line parameters. If neither is specified, the setting from /etc/localtime is used.

AUTHOR
Written by David MacKenzie

REPORTING BUGS
Report bugs to .

COPYRIGHT
Copyright ? 2006 Free Software Foundation, Inc.

This is free software…………………….

SEE ALSO
The full documentation for date is maintained as a Texinfo manual.

If the info and date programs are properly installed at your site, the command

info date

should give you access to the complete manual.

date 5.97 May 2006 DATE(1)

/**************************************************************************/

上面的DATE(1)中的数字1有含义,代表一般用户可使用的命令。其他数字含义:

1 –> 用户在shell环境中可以操作的命令或者可执行文件

2 –> 系统内核可以调用的函数或者工具等

3 –> 一些常用的函数(function)与函数库(library),大部分为C的函数库(libc)

4 –> 设备文件的说明,通常在/dev下的文件

5 –> 配置文件或者是某些文件的格式

6 –> 游戏(game)

7 –> 惯例与协议等,例如linux文件系统、网络协议、ACSII code等说明

8 –> 系统管理员可执行的惯例命令

9 –> 跟kernel有关的文件

注:上面的1、5、8特别重要,要背下来。

man -f man 可以取得更多与man相关的信息

info命令可以用非常好看的排版页面格式显示帮助信息,跟man功能差不多。

可以再/usr/share/doc下面找到更多的帮助文档,这些文档不仅告诉你How to,还告诉你Why,一些背后的原理。

===文件系统错误后恢复===

* 如果根目录没有损坏,很简单,开机的时候会提示你,输入root密码,然后登陆进入单用户维护模式。输入 "fsck /dev/sda7"就可以了。

* 如果根目录损坏了,把硬盘拔下来,接到另一个linux系统上,不要挂载该硬盘,然后以root执行 "fsck /dev/sdb1",一切OK

* 如果硬盘整个坏掉了,没办法了,重新买硬盘吧,看数据能恢复多少事多少。o(╯□╰)o

===忘记root密码===

开机进入grub画面后,按e进入进入编辑模式,后面加入single进入单人维护模式。然后不用输入密码就可以取得root权限,之后运行passwd重置密码即可。

免责声明: 凡标注转载/编译字样内容并非本站原创,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如果你觉得本文好,欢迎推荐给朋友阅读;本文链接: https://m.nndssk.com/xtwt/157289gDr9za.html
猜你喜欢
最新应用
热门应用