ubuntu: add user

by prettyscripts on 2009-10-15 10:23:11 • Leave a comment »

unix

there are 2 commands to add user: userad and adduser. (the commands could be the same for other linux.) adduser is easier to use. it prompts for relevant information. to allow new user to run sudo, run: $ usermod -G admin <username> more »

Tags: linux, ubuntu, user

vi: insert shell output

by prettyscripts on 2009-08-10 11:41:23 • Leave a comment »

unix

to run shell command while in vi: :!command to insert output from shell command after the cursor: :r!command more »

Tags: insert, shell, unix, vi

fedora: disable selinux

by prettyscripts on 2009-04-28 02:41:32 • Leave a comment »

unix

selinux stands for security-enhanced linux. it’s probably too secured and caused a lot of file errors. i always turn it off. the following applies to fedora core 10. it’s probably more or less the same for previous versions or other linux platforms.… more »

Tags: fedora, selinux, unix

php: image manipulation

by prettyscripts on 2008-12-04 10:57:59 • Leave a comment »

phpunixcode

the gd image library provide functions to manipulate image files. on some installations, this does not come as default and needs to be installed. on fedora, the command is$ yum install php-gd on ubuntu, the command is$ sudo apt-get install php5… more »

Tags: fedora, gd, image, php, ubuntu

unix time to human readable format

by prettyscripts on 2008-07-18 10:58:05 • Leave a comment »

miscunix

some log files such as squid log uses uses unix time as timestamp, which looks like some random number generated number. you can use this online conversion tool. to run from unix command line, to convert to human readable format, eg in yyyy-mm-dd hh:… more »

Tags: timestamp, unix