≡ Menu

Programming

How To Find Files by Content Under UNIX

I had written lots of code in C for my school work and saved it as source code under /home/user/c/*.c and *.h. How do I find files by content such as string or words (function name such as main() under UNIX shell prompt?
[click to continue…]

PHP: Verify And Sanitize Email Address

Q. How do I verify input data such as email address under PHP programming language?
[click to continue…]

Shell: How To Remove Duplicate Text Lines

Q. I need to sort data from a log file but there are too many duplicate lines. How do I remove all duplicate lines from a text file under GNU/Linux?
[click to continue…]

Linux / UNIX Shell: Sort IP Address

Q. I’d like to sort a list of IP address stored in a text file. How do I sort by last notation or entire address under Linux or UNIX operating systems?
[click to continue…]

Find command: Exclude or Ignore Files (e.g. Ignore All Hidden .dot Files )

How do I ignore all hidden .dot files while searching for files using the find command? How do I ignore or exclude certain files while running Linux or UNIX find command?
[click to continue…]

PHP Redirect To Another URL / Web Page Script Example

How do I redirect with PHP script? How can I use a PHP script to redirect a user from the url they entered to a different web page/url?
[click to continue…]

How do I Be More Productive In Vim?

This is a user contributed FAQ.

Q. I’m just starting in vim text editor but I’m annoying typing and retyping similar statements. Can you address me about it?
[click to continue…]

Moving Around With vim (keyboard short cuts)

This is a user contributed FAQ.

Q. Can you tell me few useful vim text editor keyboard short cuts for moving around while editing text files?
[click to continue…]

How To Find and Overcome Shell Command Line Length Limitations

While using mv or rm command I get command line length error (Argument list too long error). How do I find out current running shell command line length limitations? How do I overcomes these limitations while writing UNIX / BSD / Linux shell utilities?
[click to continue…]

KSH For Loop Examples

Q. How do I use for loop in Korn Shell under UNIX / Linux / BSD / OS X operating systems?
[click to continue…]