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

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

linux version

by prettyscripts on 2008-05-28 00:22:51 • Leave a comment »

unix

to find out the ubuntu version the server is running, the information can be found in file /etc/issue. alternatively, run this command: $ lsb_release -a to find out the kernel version, run this command: $ uname -a these commands are probably appl… more »

Tags: linux, unix, version

ubuntu server: setup website

by prettyscripts on 2008-03-22 16:14:38 • Leave a comment »

unix

copy files to destined directory. go to /etc/apache2/sites-availabe, edit the ’site’ file. the default is ‘default‘. if creating a new site file, after creating and editing the file, run sudo a2ensite file. to disable the site, run sudo a2dissite fil… more »

Tags: apache, setup, unix