This command allows you to see what apps are consuming internet.
ss -p
This command allows you to see what apps are consuming internet.
ss -p
#!/bin/bash
#eg.
#sh snapshot.sh FOLDER [go]
# 'go' will execute
path=Snaphotbackup-`date +%m-%b-%y`
# Run with "go" as the second CLI parameter to actually run the rsync command, otherwise prints the command that would have been run (useful for testing)
if [[ "$2" == "go" ]]
then
rsync -avP --delete $1 $1-$path
else
echo rsync -avP --delete $1 $1-$path
fi
PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
sed '1 i this is first line' file
sed '$ a this is last line' file