Pages

Monday, July 26, 2010

How to background and nohup (run after terminal close) a running process

  1. run it in the foreground
  2. stop it (CTRL+Z)
  3. disown it so that it won't be closed when you close your shell (disown -h %jobid)
  4. restart the job in the background (bg %jobid)

Saturday, July 10, 2010

Youtube to ipod video converter

http://keepvid.com/

Seems to be affiliated with AVS video converter.

I save them as MP4s.

Wednesday, June 9, 2010

setuid and getuid program execution

http://en.wikipedia.org/wiki/Setuid

The sticky bit on user or group causes the command to run as that user or group
chmod ug+s printid

I typically used this on the group of a directory forces the sub files/folders to be in the same group.

This is also how commands that require root level are able to be executed.

You can prevent this from happening by mounting a partition with the nosuid option.


Saturday, May 29, 2010

Mercurial: publish multiple repositiory with hgwebdir.cgi

The biggest problem I had was adding a script handler into the apache directory configuration.  Otherwise everything went smoothly

http://mercurial.selenic.com/wiki/PublishingRepositories#multiple

http://mercurial.selenic.com/wiki/PublishingRepositories

Reliable Windows backup

My wife has over 100K files and some very, very log file names.  These have caused me lots of grief over the years.  The following robocopy seems to work the best out of everything.
 
The file name/folder path length is the oddity.  I don't remember all the details, but it is something like... NTFS allows very large if not infinite file name and folder path lengths.  However, very view applications accomiadate this.  The includes Microsofts file explorer.  I don't recall if I attempted using the file explorer in Windows7, but I am certain it failed as late as Vista.
 
robocopy f:\Users\rox\Desktop g:\Desktop /s /e /eta
robocopy f:\Users\rox\Favorites g:\Favorites /s /e /eta
robocopy f:\Users\rox\Documents g:\Documents /s /e /eta
robocopy f:\Users\rox\Pictures g:\Pictures /s /e /eta