Linux commands
Материал из xapmc.net
- Multi create file
touch file{1..10}.txt
for f in {a..z} {A..Z} {0..99}; do echo hello > "$f.txt"; done
for i in {1..10}; do touch file$i.txt; done
- Multi remove file
rm file[1-9].txt rm *txt rm file*.*
- Remove only one file "file10.txt"
rm file1[0].txt
- Awk
- Second word in line the file "file1.txt"
awk '{print $2}' file1.txt
- Autostart
update-rc.d $name defaults
- Find
find / -type d -name 'file'
- VLAN create
modprobe 8021q ip link add link ens3 name ens3.14 type vlan id 14 ip addr add 10.10.10.14/24 dev ens3.14 ip link set ens3 up ip r a 0.0.0.0/0 via 10.10.10.1
- Mount smb share
apt-get install cifs-utils mount -t cifs //192.168.0.222/Volume_2/Kino /home/xapmc/TEMP/FILMS/move