Check These Out
This is how I typically grep. -R recurse into subdirectories, -n show line numbers of matches, -i ignore case, -s suppress "doesn't exist" and "can't read" messages, -I ignore binary files (technically, process them as having no matches, important for showing inverted results with -v)
I have grep aliased to "grep --color=auto" as well, but that's a matter of formatting not function.
This command clone the first partition of the primary master IDE drive to the second partition
of the primary slave IDE drive (!!! back up all data before trying anything like this !!!)
This script creates date based backups of the files. It copies the files to the same place the original ones are but with an additional extension that is the timestamp of the copy on the following format: YearMonthDay-HourMinuteSecond
We sometimes need to change kernel parameters by echoing the file . This needs root privilege and if we do it using sudo like this , it fails
$ sudo echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
-bash: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied
We can achieve this with the tee command by just doing sudo without logging as root user
http://www.zaman4linux.in/2010/09/using-tee-to-echo-to-system-file-with.html
remove the host for the .ssh/know_host file
Installs pip packages defining a proxy
Only useful for really flakey connections (but im stuck with one for now). Though if youre in this situation ive found this to be a good way to run autossh and it does a pretty good job of detecting when the session is down and restarting. Combined with the -t and screen commands this pops you back into your working session lickety split w/ as few headaches as possible.
And if autossh is a bit slow at detecting the downed ssh connection, just run this in another tab/terminal window to notify autossh that it should drop it and start over. Basically for when polling is too slow.
kill -SIGUSR1 `pgrep autossh`
you can just use one awk script to parse the rss feed. No need to pipe so many awk's and sed's. Its ugly and inefficient.
wget http://nginx.org/download/nginx-1.15.3.tar.gz && tar -xzf 1.15.3.tar.gz && cd nginx-1.15.3