Notices tagged with guestweek
-
uptime # quickly see server uptime, load average, etc. By @missemmagoodwin #guestweek
-
grep -roh lorem . | wc -w # count all occurrences of a string in a directory. By @missemmagoodwin #guestweek
-
:!git pull # execute quick commands within vim. By @missemmagoodwin #guestweek
-
ls -rt /tmp | tail -n1 # shows the most recent file. By @missemmagoodwin #guestweek
-
ssh-copy-id user@server # Quickest way to add ssh key to a remote host. Mac users may not have this command. By @missemmagoodwin #guestweek
-
cut -d, -f 3 | sort | uniq -c | sort -n # get a sorted frequency count of the 3rd column in a CSV file. By @ProfKuperman #guestweek
-
find ~/Dropbox/ -name \*conflicted\* # for non-mac systems. By @ProfKuperman #guestweek
-
bind '"\e[B":history-search-forward' # will make down arrow behave in a similar manner. By @ProfKuperman #guestweek
-
bind '"\e[A":history-search-backward' # will only pull things from history matching line typed so far. By @ProfKuperman #guestweek
-
set -o vi # gives you vi keybinding on the command line, use "bindkey -v" for tcsh. By @ProfKuperman #guestweek
-
vim -p *.h *.c # opens files in tabs, first headers than C source. By @ProfKuperman #guestweek
-
fc # In BASH, open in $EDITOR the last executed command, rerunning it after the modifications. By @Donearm #guestweek
-
grep ^[^#] file # strip file of empty and commented lines. Change the comment character accordingly. By @Donearm #guestweek
-
gtf 1920 1200 60 # print the Modeline for xorg.conf for a 1920x1200@60Hz monitor. By @Donearm #guestweek
-
xset -dpms && xset s off # prevent the monitor to ever go in standby or to power off and disable the screensaver. By @Donearm #guestweek
-
(head -5; tail -5) < file # show the first and last 5 lines of file. By @Donearm #guestweek
-
du -h path | awk '$1 ~ ".*M.*" {print $2}' # find which directory in path is bigger than 1Mb. By @Donearm #guestweek
-
sed '/text/{N;d;}' .bash_history # Remove text from the history along with the following line (to keep file syntax intact) #guestweek
-
cat /proc/cmdline # see parameters that your kernel was booted with. By @zeitgeist_y2k #guestweek
-
ls -rtl | tail -n 1 # find latest file in a directory. By @zeitgeist_y2k #guestweek