Jonathan Leffler
Reputation
3,533
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
 Mar 14 comment Avoid unwanted path in Zip file @~quack: +1 especially for the sub-shell technique in the comment. Mar 12 answered grep beginning of file? Mar 12 comment grep beginning of file? You need to quote the file names if they could contain spaces. And you'd probably want to lose the output from 'grep' to /dev/null. You could also use: head -1 "$i" | grep '^&2; exit 1; } Mar 3 comment Unix commandline to repeat command with pipes Why not 'eval "$@"' in the script? Mar 3 answered Are USB cables device specific? Feb 26 comment Documenting Unix commands on the command line @dmckee: When you write 'sh -x', the shell does not do a path-based search for the script - you have to specify the path completely. Feb 26 comment Documenting Unix commands on the command line I never had any problems with 'sh -x' on MacOS X 10.5 (or 10.4, ..., or currently on 10.6.2). Which shell are you using? 'sh -x' is common across the majority of shells - I must admit, I was not aware of any that did not support it. Feb 25 answered Documenting Unix commands on the command line Feb 22 answered Delete matching files in all subdirectories Feb 8 answered how to make softlink to bunch of files in one shell comand Feb 7 answered Does the order of command options in linux matter? Feb 7 comment Why does \rm work but rm doesn't? If it asks you whether to examine the files in '/', do you say 'yes' or 'no'? And does the machine continue to work afterwards? Be very careful about deleting everything under root when running as root; the machine keeps going for a surprisingly long time, but there comes a point at which you have to reboot - off a CD or something similar. Feb 6 answered root directory - www or public_html Jan 17 comment Multiple Users with owner rights? Note that there's still only one user with owner rights; that's fixed. But that user can give the group members appropriate access rights. Consider using the SGID bit on the directories to ensure that files created in them belong to the same group (the administrators group). Jan 16 comment How can I keep a process alive after closing the putty session? Yup - disown looks to be the way to go for an already running job. It's doable because the shell that started the job can manipulate the properties needed. Jan 16 comment How can I keep a process alive after closing the putty session? Too late...at least, for normal operations. It wouldn't be altogether surprising to find that if you attach a debugger to the process, and then tweaked it with an appropriate set of system calls, then perhaps you could put it in the background. But it is not what could be recommended - I wouldn't bother, for example, and I have at least some idea of what might be involved. You have two choices now...either stay connected until it finishes, or stop the current process, and restart a new one using nohup. Jan 16 comment How can I keep a process alive after closing the putty session? Normally, control-z puts the process into a state of suspended animation; the bg command puts it into the background. However, that also keeps the process attached to the terminal, whereas nohup detaches it from the terminal and therefore allows putty to disconnect and the process to survive the disconnection. Jan 14 comment Removing Symantec Antivirus from a Mac? Right click is equivalent to Control-Click - so I can do that, and was able to remove the System Preference items. I found one of the (other) bits of software that I want to get rid of in /Library/LaunchDaemons; I think I found the Symantec ones in /Library/StartupItems - the other directories looked clean. Thanks for the excellent assistance.