1.clock 和hwclock的用法
[root@localhost ~]# clock --help
hwclock - query and set the hardware clock (RTC)
Usage: hwclock [function] [options...]
Functions:
-h | --help show this help
-r | --show read hardware clock and print result
--set set the rtc to the time given with --date
-s | --hctosys set the system time from the hardware clock
-w | --systohc set the hardware clock to the current system time
--systz set the system time based on the current timezone
--adjust adjust the rtc to account for systematic drift since
the clock was last set or adjusted
-c | --compare periodically compare the system clock with the CMOS clock
--getepoch print out the kernel‘s hardware clock epoch value
--setepoch set the kernel‘s hardware clock epoch value to the
value given with --epoch
-v | --version print out the version of hwclock to stdout
Options:
-u | --utc the hardware clock is kept in UTC
--localtime the hardware clock is kept in local time
-f | --rtc=path special /dev/... file to use instead of default
--directisa access the ISA bus directly instead of /dev/rtc
--badyear ignore rtc‘s year because the bios is broken
--date specifies the time to which to set the hardware clock
--epoch=year specifies the year which is the beginning of the
hardware clock‘s epoch value
--noadjfile do not access /etc/adjtime. Requires the use of
either --utc or --localtime
--adjfile=path specifies the path to the adjust file (default is
/etc/adjtime)
--test do everything except actually updating the hardware
clock or anything else
-D | --debug debug mode
hwclock –s 同步硬件时间到系统时间
hwclock –w 同步系统时间到硬件时间
hwclock –r 显示当前硬件时间状态
cd / 直接跳转到根目录
cd etc 或cd /etc进入 根目录下的etc目录 前一个是相对路径,后一个是绝对路径
cd .. 返回上一级目录
3cal 调出日历
CAL(1)
NAME
cal - display a calendar
SYNOPSIS
cal [options] [[[day] month] year]
cal 显示当前日历
cal year 显示所属年份日历
cal -s 本月日历按Sunday列出
cal –m 本月日历按Monday列出
4. pwd 显示当前工作目录 命令行下直接pwd
5. ls
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
ls:list
列出指定路径下的文件或目录的属性信息
Metadata:属性数据
data:数据
ls [OPTION]... [FILE]...
-l: 使用长格式显示
drwxr-xr-x 1 root root 8 Aug 23 08:47 .cache
d: 文件类型
rwxr-xr-x:权限,mode
1:文件被硬链接的次数
root: owner,属主;
root: group, 属组
8:size,默认为字节
Aug 23 08:47 修改时间戳
.cache:文件名
-d:显示目录自身属性
-h: human-readable
-a:显示所有文件,包括.开头的隐藏文件
.: 当前目录
..: 父目录
-r: reverse,逆序显示
-R: recusive,递归
6.which 和whereis
查找shell命令路径,但是whereis 会给出帮助文件路径
stat
stat –f file 显示文件状态
echo 回显命令
echo [SHORT-OPTION]... [STRING]...
echo LONG-OPTION
DESCRIPTION
Echo the STRING(s) to standard output.
-n do not output the trailing newline
-e enable interpretation of backslash escapes
-E disable interpretation of backslash escapes (default)
--help display this help and exit
echo -e 你好 ‘\n‘ 回显你好,并让换行符生效
echo -n nihao 不进行换行
w who 和whoami
w 显示谁登录和系统 并且在做什么
who 显示登录系统的用户 那种终端登陆 以及登录的时间和登录地址
whoami 显示登录系统的用户
shutdown,halt,poweroff 系统关机命令
reboot 系统重启命令
原文地址:http://2015standy.blog.51cto.com/1478824/1689519