###時間的同步###數據庫
服務端
vim
yum install chrony -y ##安裝服務服務器
vim /etc/chrony.conf ##主配置文件app
21 #Allow NTP client access from local network.ide
22 allow 172.25.0.0/24 ##容許誰去同步個人時間rest
27 #Serve time even if not synchronized to any NET serverserver
28 local stratum 10 ##不去同步任何人的時間,時間同步服務器級別blog
systemctl restart chronydip
systemctl stop firewalldci
2.客戶端
vim /etc/chrony.conf
3 server 0.rhel.pool.ntp.org iburst
4 server 1.rhel.pool.ntp.org iburst=======>server ntpserverip iburst
5 server 2.rhel.pool.ntp.org iburst=======>
6 server 3.rhel.pool.ntp.org iburst
systemctl restart chronyd
###timedatectl命令
timedatectl status ##顯示當前時間信息
set-time ##設定當前時間
list-timezones ##列出全部時區
set-timezone ##設定當前時區
set-local-rtc 0|1 ##設定是否使用utc時間
####設備識別
串口硬盤 sata sda
並口硬盤 sda hda
/dev/xdxn ##硬盤設備/dev/sda1
/dev/cdrom ##光驅
/dev/mapper/* ##虛擬設備
#####設備的發現
fdisk -1 ##查看真實存在的設備
cat /proc/partitions ##查看系統可以識別的設備
blkid ##系統可以掛載使用的設備id
df ##查看設備被系統使用的狀況
####設備的使用
設備的掛載
mount 設備 掛載點
mount /dev/sdb1 /mnt ##把電腦第二塊硬盤的第一個分區掛載到/mnt下
2.卸載設備
umount 設備|掛載點
若是在卸載設備時出現 target is busy.的錯誤,解決方法以下:
fuser -kvm 設備|掛載點 ##-k kill -v顯示詳細信息 -m 掃描設備
#####軟硬鏈接
軟連接:多個節點對應一個數據塊
硬連接:一個節點對應多個數據塊
ls -i ##查看文件節點號
ln -s /file / file1 ##軟連接
ln /file /file1 ##硬連接
###文件查找
locate filename ##在文件數據庫中搜索信息
updatedb ##更新數據庫
find 查找位置 -條件 條件值
-name
-user
-group
-size
-not