qfedu-linux-advanced-level/day1/d1.sh

23 lines
630 B
Bash
Executable File

#!/bin/bash
mkdir /home/flykhan/qfedu-linux-advanced-level/day1/cmd_test
echo "1-----mkdir-----end"
cd /home/flykhan/qfedu-linux-advanced-level/day1/cmd_test
echo "2-----cd-----end"
cp /lib/*.so* ./
echo "3-----cp-----end"
tar jcvf so.tar.bz2 *.so*
echo "4-----tar jcvf-----end"
tar zcvf so.tar.gz *.so*
echo "5-----tar zcvf-----end"
mkdir c_test
echo "6-----mkdir c_test-----end"
tar zxvf so.tar.gz -C ./c_test
echo "7-----tar zxvf-----end"
rm so.tar.gz
echo "8-----rm-----end"
chmod 700 so.tar.bz2
echo "9-----chmod 700-----end"
ls /dev/ > dev.txt
echo "10-----ls /dev-----end"
grep console dev.txt -n
echo "11-----grep-----end"