Four simple lines of bash/sh script to archive the /etc/hosts file before changing it. Don't leave home without this tiny gold nugget script.
#!/usr/bin/bash
xdate=`date +%Y%m%d%H%M`
cp /etc/hosts /etc/hosts.$xdate
vi /etc/hosts
scp /etc/hosts 10.10.10.43:/etc
# last line copies the new file to another Linux
Subscribe to:
Post Comments (Atom)
Script to see network interface connection speed
cat network-speed #!/usr/bin/bash # ethtool enp2s0 | grep Speed ethtool $1 | grep Speed # mii-tool -v enp2s0 mii-tool -v $1 network-speed ...
-
This script with it's two related configuration files worked on Raspberry Pi Raspbian Linux. What was always sketchy was the "dri...
-
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Recommended for catching common errors. Send...
-
cat network-speed #!/usr/bin/bash # ethtool enp2s0 | grep Speed ethtool $1 | grep Speed # mii-tool -v enp2s0 mii-tool -v $1 network-speed ...
No comments:
Post a Comment