Where are programs like make, gcc, python, etc?
They are all under
whoami are under
You should set them in your PATH.
Setting up the default gateway under SunOS
route add default x.x.x.x and also add the IP to the
/etc/defaultrouter file such that it will survive a reboot
This is analogous to
route add default gw x.x.x.x under linux.
Extracting a .tar.gz archive
gzip -dc File.tar.gz | tar xf - to extract File.tar.gz
This is analogous to
tar -xzf File.tar.gz under linux.
The first few lines of the top command looks similar to this:
Tasks: 137 total, 1 running, 136 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 4.2%sy, 90.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 5.8%st
Mem: 786432k total, 715152k used, 71280k free, 61012k buffers
Swap: 2096472k total, 18304k used, 2078168k free, 168068k cached
The fields on the second line breaks down the CPU usage into 8 categories.
|| CPU used by user processes
|| CPU used by system/kernel processes
|| CPU used by processes that were reniced
|| CPU not used
|| io wait
|| Essentially idle CPU waiting on IO devices
|| hardware irq
|| CPU used to service hardware IRQs
|| software irq
|| CPU used to service soft IRQs
|| steal time
|| CPU time which the hypervisor dedicated (or ‘stole’) for other guests in the system.
Create a .htaccess file with the following:
To ignore certain files, use IndexIgnore:
If you are trying to compile RRDTool (at the time of writing, 1.4.5) on CentOS 5.x, you will need install the following packages on yum:
yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel
Then, just compile rrdtool as usual:
tar -xzf rrdtool-1.4.5.tar.gz
To merge the standard out and standard error streams from a program, use
umount /adsf/asdf 2>&1 will output the errors into standard out instead of standard error as usual.
- 2 is the file descriptor for stderr.
- 1 is the file descriptor for stdout.
- & accepts a file descriptor which can then be treated as a file.
2>&1 in turns ‘writes data’ from stderr into stdout.
Here’s a quick way to reset your mysql root password. Replace ‘NewRootPass’ with your new root password and run the following as root.
mysqld --skip-grant-tables --user mysql &
mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('NewRootPass') WHERE User='root'"
Note: This was done on CentOS. You might need to adjust the path to mysql’s startup scripts accordingly.