Tag Archives: unix

Elinks User Agent Override

To manually set the useragent for the e-links web browser, edit this file: ~/.elinks/elinks.conf The syntax for setting or overriding the user agent is something like this: set protocol.http.user_agent = “Firefox/2.0.0.4″ Or possibly this for a more realistic agent string: … Continue reading

Posted in Web Development | Tagged , , , , , , , | Leave a comment

Unix: Change To Last Directory

If you’re wondering, can I: in unix, change to last directory in unix, cd to last used directory in unix change to most recent directory Well, cd – will switch you to the previous directory. For example, if you are … Continue reading

Posted in Tech Tips | Tagged , | Leave a comment

Where Linux Mail files are stored on OS X

“1 new message” – a common notification when you start the terminal, especially if you have cron jobs set up and an error occurs. You can use the built-in “mail” function to check and erase messages, or you can manually … Continue reading

Posted in Tech Tips | Tagged , , , , | Leave a comment

Replacing Variables with Bash

$(var:pos[:len]) # extract substr from pos (0-based) for len $(var/substr/repl) # replace first match $(var//substr/repl) # replace all matches $(var/#substr/repl) # replace if matches at beginning (non-greedy) $(var/##substr/repl) # replace if matches at beginning (greedy) $(var/%substr/repl) # replace if matches … Continue reading

Posted in Web Development | Tagged , | Leave a comment

unix commands

find / grep find . -iname “*.php” -exec grep -textString {} \;

Posted in Tech Tips | Tagged , , | Leave a comment

ibm aix

Maybe this still has a place in today’s tech world, but I think IBM should just give up and move over to working with true *NIX clipped from en.wikipedia.org IBM AIX AIX (Advanced Interactive eXecutive) is the name given to … Continue reading

Posted in Tech Opinion | Tagged | Leave a comment

Useful Unix Commands

To backup everything in the current directory, exclude anything ending with jpg: tar cvf mybackup.tar –exclude “*.jpg” . To exclude more than one type, just add another –exclude statement: tar cvf mybackup.tar –exclude “*.jpg” –exclude “*.gif” . Search current directory … Continue reading

Posted in Tech Opinion, Tech Tips, Web Development | Tagged | Leave a comment