Error: “PEAR: command not found”
If you build PHP with PEAR, and the script pear does not exist on your server, this is what happened:
At some point, /usr/local/bin/pear and/or /usr/bin/pear were manually removed.
The directories /usr/local/lib/php/.registry and/or /usr/lib/php/.registry exist.
During PHP’s make install, the existence of those .registry directories cause the PEAR shell archive to think PEAR is already installed, so it skips the remainder of the PEAR build. Therefore, the bin/ files are not rebuilt.
However, if you move or delete the .registry files so that the build will complete, you lose the data about PEAR modules installed on the system.
How to resolve this issue.
The best course of action is to download the PEAR tarball from http://pear.php.net/package/PEAR/download to obtain the bin/ that is missing on your server, and place it in the proper location on your system.
Reference : http://cpanel.net & http://pear.php.net/
The umask command
The umask command shows and sets the default permissions:
The umask value is just that, a mask. It masks out the permissions you don’t want to give.The umask value is subtracted from the full permission set for an object. The full permission for a file is mode 666 (read/write permission for all), but for a directory it’s 777 (read/write/execute permission for all).
Thus, in the example, the file starts out with permissions 666, and the umask of 022 is applied, leaving a file permission of 644. The umask value is normally set in the /etc/profile startup file.
Shell Command Aliases
A command alias allows you to create an alias name for common commands (along with their
parameters) to help keep your typing to a minimum.
Most likely your Linux distribution has already set some common command aliases for you. To
see a list of the active aliases, use the alias command with the -p parameter:
Example:
$ alias -p
alias l.=’ls -d .* –color=tty’
alias ll=’ls -l –color=tty’
alias ls=’ls –color=tty’
alias vi=’vim’
alias which=’alias | /usr/bin/which –tty-only –read-
alias–show-dot –show-tilde’
The complete parameter list for the ls command.
There are lots of parameters for the ls command that can come in handy as you do file management. If you use the man command for ls, you’ll see several pages of available parameters for you to use to modify the output of the ls command.
root@dell:~# ls -sail /etc |less
418076 8 -rw-r–r– 1 root root 4623 May 5 2009 Muttrc
493130 4 drwxr-xr-x 2 root root 4096 Jul 6 2009 Muttrc.d
416980 4 drwxr-xr-x 3 root root 4096 Sep 27 2008 NetworkManager
500697 4 drwxr-xr-x 2 root root 4096 Apr 7 2009 ODBCDataSources
416981 4 drwxr-xr-x 13 root root 4096 Dec 8 19:19 X11
416982 4 drwxr-xr-x 4 root root 4096 Sep 1 2007 Xprint
417381 4 -rw-r–r– 1 root root 2563 Jan 3 2008 a2ps-site.cfg
417382 16 -rw-r–r– 1 root root 15064 Jan 3 2008 a2ps.cfg
416983 4 drwxr-xr-x 9 root root 4096 Sep 27 2008 acpi
A common combination to use is the -a parameter to list all files, the -i parameter to list the inode for each file, the -l parameter to produce a long listing, and the -s parameter to list the block size of the files. The inode of a file or directory is a unique identification number the kernel assigns to each object in the filesystem. Combining all of these parameters creates the easy-to-remember -sail parameter.
Using cat command to number nonempty output lines
-b, –number-nonblank
number nonempty output lines
root@dell:/etc# cat -b inittab
1 # /etc/inittab: init(8) configuration.
2 # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
3 # The default runlevel.
4 id:2:initdefault:
-n, –number
number all output lines
root@dell:/etc# cat -n inittab
1 # /etc/inittab: init(8) configuration.
2 # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
3
4 # The default runlevel.
5 id:2:initdefault: