运维基础学习笔记 - embedclub/Lavender GitHub Wiki

bash命令

查询占用大小
du -s
du -h
查询文本内容命令
cat, more, less, head, tail, cut, sort, uniq, grep
tree stat file nano是编辑器 date clock hwclock, cal

#!/bin/bash

#basic commnd

cd ~
pwd

if [ -f myservice ], then
rmdir myservice

if [ echo $? == 0 ], then

mkdir myservice
cd myservice
touch a.txt
file a.txt

date > a.txt
cat a.txt
clock >>a.txt
hwclock >>a.txt

cal >> a.txt

cat a.txt