April 2010
2 posts
commands to recursively remove .svn files →
Apr 27th
set - set or unset values of shell options and...
-C (-o noclobber) If set, disallow existing regular files to be overwritten by redirection of output. -x Print commands and their arguments as they are executed. -e Exit immediately if a command exits with a non-zero status.
Apr 12th
March 2010
5 posts
dog - better than cat
dog URL writes URL to stdout --images treats input as HTML and lists unique, absolute image links from input data.
Mar 30th
locate - find files by name
-i, --ignore-case Ignore case distinctions when matching patterns. -b, --basename Match only the base name against the specified patterns. -c, --count Instead of writing file names on standard output, write the number of matching entries only. -e, --existing Print only entries that refer to files existing at the time locate is run. -L, --follow When checking whether files exist (if...
Mar 30th
tac - concatenate and print files in reverse
-s, --separator=STRING use STRING as the separator instead of newline -r, --regex interpret the separator as a regular expression -b, --before attach the separator before instead of after
Mar 30th
tail
-f, --follow output appended data as the file grows -s, --sleep-interval=S with -f, sleep for approximately S seconds (default 1.0) between iterations --retry keep trying to open a file even when it is or becomes inaccessible; useful when following by name, i.e., with —follow=name -F same as —follow=name —retry
Mar 30th
2 tags
cat - concatenate files and print on the standard...
-n, --number number all output lines -b, --number-nonblank number nonempty output lines -s, --squeeze-blank suppress repeated empty output lines set -o noclobber set +o noclobber (>|) allow and prevent redirection of cat accidentally overwriting existing files
Mar 30th
1 note
February 2010
4 posts
Linux middle-click to paste with keyboard
Shift-Insert in terminal
Feb 9th
Python main() functions by Guido van van Rossum →
Best practice when running modules in interactive mode and correctly returning error codes. * needs reformatting after Amplification.
Feb 9th
Feb 5th
1 tag
Feb 1st
112 notes
January 2010
2 posts
1 tag
Compare two files (not in version control) in... →
Jan 29th
3 tags
set TraitsUI (PyFace) backend to Qt4
In a Python script: import os os.environ['ETS_TOOLKIT'] = 'qt4' # Must be prior to any traits imports In a shell script: #!/bin/sh export ETS_TOOLKIT="qt4" (Also an attempt to quote source code in Tumblr a la this post)
Jan 29th