Feed on
Posts
Comments

Archive for the 'Unix' Category

if you don’t have a sudo account that doesn’t mean that you won’t be able to compile and install code from source.  it turns out that all you need to do is set the prefix ./configure flag to a directory that you’ve got write-access to, and then you’re set to go.  i found this extremely [...]

it’s unfortunate, but exposureplot doesn’t run for the mac.  don’t fear though — if you’d like to find the distribution of focal lengths you use in your photos, all you need to do is the following: 1)  install jhead.  if you’ve got http://www.macports.org/ installed,  it’s as easy as: >> sudo port install jhead 2)   [...]

a reasonable way to first try and compile source code that someone has handed you: 1)  navigate over to the source directory. 2) >> ./configure 3)  >> make 4)  >> make install

to change the default unix or linux login shell, use the chsh command:  >> chsh then, type in /bin/bash if you want the bash shell to be your default, or /bin/csh if you’d like the c-shell, etc.

to measure how much time a program takes to execute from the command-line, use the ‘time’ function. for instance, to time the ‘date’ command: >> time date Wed Oct 31 14:12:41 EDT 2007 real    0m0.003s user    0m0.000s sys     0m0.002s

apply grep recursively

i was always too dumb to get the “-R” option of grep working correctly so that i could apply grep recursively.  finally, i came across a simple workaround that uses find and xargs: find ./ -name “*.py” | xargs grep “my_pattern”

if you find yourself happy with the stability of debian stable but occassionally want to use testing packages, you can use the following trick: $ sudo emacs /etc/apt/apt.conf add in the line: APT::Default-Release “stable”; and then add the following to your /etc/apt/sources.list file: deb http://debian.lcs.mit.edu/debian/ testing main deb-src http://debian.lcs.mit.edu/debian/ testing main now, run $ sudo [...]

i was getting this error while trying to compile faad2: configure.in:14: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 i made this error go away by install “libtool:” $ sudo apt-get install libtool

install aclocal in debian

to install aclocal on a debian machine, just install automake: $ sudo apt-get install automake

if you receive the following error: “configure: error: installation or configuration problem: C++ compiler cannot create executables.” try: sudo apt-get install g++

« Prev - Next »

More blogs about http://desk.stinkpot.org:8080/tricks.