Check These Out
For example, to remove line 5 from foo, type: vi +5d +wq foo
Set the affinity of a process to a particular core(s).
Arguments for processor include a comma separated list, or a range. (example: 1,2 or 0-3)
You can use top in smp mode (Press 1) to see the changes to the affinity.
##Dependancies: bash coreutils
Many executables in $PATH have the keyword somewhere other than the beginning in their file names. The command is useful for exploring the executables in $PATH like this.
$ find ${PATH//:/ } -executable -type f -printf "%f\n" |grep admin
lpadmin
time-admin
network-admin
svnadmin
users-admin
django-admin
shares-admin
services-admin
To take information about the characteristics of the installed memory modules.
Installs pip packages defining a proxy
$ function echox { echo `tput cup $(($(tput lines))) $(( ($(tput cols) - $(echo "${#1}"))/2 ))`"$1"`tput cup $(tput lines) $(( $(tput cols)-1 ))`; }
echox prints given argument on bottom line center screen in terminal
$ function echoxy { echo `tput cup $(($(tput lines)/2)) $(( ($(tput cols) - $(echo "${#1}"))/2))`"$1"`tput cup $(tput lines) $(( $(tput cols)-1 ))`; }
exhoxy prints given argument center screen
$ function echos { echo `tput cup $(($(tput lines)-2)) $(($(tput cols)-$(echo ${#1})))&&tput sc`"$1"`tput cup $(($(tput lines)-2)) 0 && tput rc`; }
$ while [ 1 ]; do echos "`date`"; done
echos prints date and time on second from last line (used as status message)
you can easily use these functions by placing them in your .bashrc file, make sure to source your .bashrc once you do
Take a screenshot of the focused window with a 4 second countdown
# shorten by adding to your .bashrc: alias sss='scrot -ucd4 && eog $(ls -tr | tail -n1)'
$ echo -e "\nalias sss='scrot -ucd4 && eog $(ls -tr | tail -n1)'" >> ~/.bashrc
-d 4 second delay
-c display countdown
-u focused window
man scrot for more flags
Friday is the 5th day of the week, monday is the 1st.
Output may be affected by locale.