Notes by voodoo
Displaying keyword search results 1 - 7
Created by voodoo on December 08, 2011 08:52:40
Last update: December 08, 2011 08:52:40
I don't know if there's a fool proof way to find out which Linux distro you are running on, but here are some ways you can try:
cat /proc/version
cat /etc/issue
cat /etc/*release
lsb_release -a
Results on Ubuntu 11.10 oneiric:
$ cat /proc/version
Linux version 3.0.0-13-gene...
Results on Red Hat Enterprise Server:
$ cat /proc/version
Linux version 2.6.18-128.1....
Created by voodoo on June 14, 2011 08:10:42
Last update: June 14, 2011 08:10:42
The command " ifconfig -a " does not list the DNS servers. Use " cat /etc/resolv.conf " to look at the DNS server configuration. It works for DHCP configured network interfaces also.
$ cat /etc/resolv.conf
# Generated by NetworkMa...
If no DNS server is configured:
$ cat /etc/resolv.conf
# Generated by NetworkMa...
Created by voodoo on June 12, 2011 19:59:59
Last update: June 12, 2011 20:00:38
Three ways to find the Ubuntu version:
$ cat /etc/issue
Ubuntu 11.04 \n \l
$ lsb_release -a
No LSB modules are available.
...
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DIS...
Created by voodoo on March 09, 2011 16:42:19
Last update: March 10, 2011 08:41:31
Email attachment blocking is a safety measure that can be a real pain in the *&^ when you have a legitimate need to send some file types that are considered "dangerous". Fortunately, as developers we have more than one weapon in our arsenal to defeat that feature. Here are some options I tried. Put the offending file in a zip - doesn't work for some services, Gmail is an example. Change file extension, e.g., from .exe to .ex_ or .doc. But this does not work if you are sending a WAR (Wab Application Archive) that contains hundreds of .js files. Base64 encode the zip, then gzip it. To restore:
cat received.gz | gzip -d - | base64 -d - >origina... This may still fail for...
Created by voodoo on July 30, 2010 14:53:33
Last update: July 30, 2010 14:54:52
The -d switch for cURL sends HTTP POST with data from the command line. To verify the data being posted, this is a CGI script that echos the data back:
#!C:/perl/bin/perl.exe ## ## echo -- echos ... Examples: POST data from command line: C:\>curl -d input1=value1^&input1=value2 http://lo... POST data from stdin (with @ before the - symbol): C:\>curl -d @- http://localhost/cgi-bin/echo.pl ... POST data from a file (with @ before the - symbol and input redirect): C:\tmp>cat data.txt abcd 1234 xyz ... For some reason, @ with file name didn't work as expected: C:\tmp>curl -d @data.txt http://localhost/cgi-bin/... One thing to notice is that cURL removes the new line characters when posting (thus the echo back is only one line instead of three). This can...
Created by voodoo on June 17, 2010 16:02:07
Last update: June 17, 2010 16:03:05
Use the uname command to display the SunOS version:
$ uname -a
SunOS STAWOW1 5.10 Generic_142900-01...
I can't find a command to display Solaris version. But the /etc/release file gives version information:
$ cat /etc/release
Solar...
This is a mapping of SunOS versions to Solaris versions:
SunOS Version Solaris Version
SunOS 5.4 Solaris 2.4
SunOS 5.5 Solaris 2.5
SunOS 5.5.1 Solaris 2.5.1
SunOS 5.6 Solaris 2.6
SunOS 5.7 Solaris 7
SunOS 5.8 Solaris 8
SunOS 5.9 Solaris 9
SunOS 5.10 Solaris 10
Reference:
SUN Solaris Unix Commands and Scripts
Created by voodoo on January 17, 2010 00:15:47
Last update: January 17, 2010 00:15:47
A runlevel is used to group the daemons (services) to start. For the Fedora/Redhat based Linux systems, the primary runlevels are:
runlevel 1: Single-User Mode
runlevel 2: Multi-User Mode
runlevel 3: Multi-User Mode with Networking
runlevel 5: X11 (runlevel 3 + X Window System)
The typical workstation runs in runlevel 5. Servers without X-server runs in runlevel 3.
To determine what runlevel you are using:
# /sbin/runlevel
To determine what runlevel your system will boot with:
# cat /etc/inittab | grep :initdefault:
id:5:in...
To switch runlevels (replace RUNLEVEL with appropriate number):
# /sbin/init RUNLEVEL
When you switch runlevel, be sure that you are at a text console so that you don't accidentally kill your session when X-server is killed.