Bash phpize command not found

[root@localhost gearman-1.0.2]# phpize bash: phpize: command not found This error comes as “phpize” command is not available on my system To fix this, install php-devel package. (Eg: CentOS on my box) [root@localhost gearman-1.0.2]# yum install php-devel

20 Useful GREP Commands

20 Useful GREP Commands grep -V Show the version of Grep command like “grep (GNU grep) 2.14” grep "search string" file_name Search for the given string. grep "search string" file_name_* Search given string in multiple files. grep -i "search string" file_name Ignore case search. grep -w "This is a test" file_name Full world search. grep

Common Linux commands

Archive.tar Create Archive tar cvf archive.tar dir_name/ Creating archive.tar Extract Files tar xvf archive.tar Extracting all files from archive.tar tar xvf archive.tar /path/to/file Extract a single file from archive.tar tar xvf archive.tar /path/to/dir/ Extract a single directory from archive.tar tar xvf archive.tar --wildcards '*.php' Extract group of files from archive.tar using –wildcards View Files tar

How to join variables in a bash script

To join/concatenate two variables in bash-script use following: 1) “${var1}_${var2}” # here we have joined var1 and var2 separated by ‘_’ 2) basePath=”/home/anj/” # base part. fileName=”myfile.txt” # fitename fileName=”${basePath}/${fileName}” # separated by / It is quite simple just place each variable adjacent to each other. ${basePath}/${fileName}” avoid variable substitution issues (if any).

How to write a custom command on linux

I want to create a custom command on linux (ubantu) which I need to execute regularly. steps are: create a shell-script place the shell script in /usr/bin/ dir name of shell-script file is custom command e.g I want kill node processes running by just typing “killnode” #!/bin/bash #fileName /usr/bin/killnode #echo "the folder is `pwd`" #echo