Tuesday, December 30, 2008

Modify timestamp in Unix

touch -t 200711031206 filename
yyyymmddhhmm format

Saturday, December 13, 2008

HTTP Status Code

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Code Abbreviation
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Page Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timed Out
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URL Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
500 Server Error
501 Not Implemented
502 Bad Gateway
503 Out of Resources
504 Gateway Timeout
505 HTTP Version Not Supported
10001 Server Request Missing Status
10052 Network Reset
10053 Socket Connection Aborted
10054 Socket Connection Reset
10060 Socket Connection Timeout
10061 Connection Refused
11005 Connection Time Out
12000 Socket Receive Timeout
12004 Invalid URL
12013 DNS Lookup Failure
14001 Byte Limit Exceeded
15001 User Script Failure
19999 Unknown Connection
30002 Excessive Number of Redirects
30005 Unsupported SSL Version
30500 Content Match Test Failed
31000 Time Out Exceeded
31000 Timeout Exceeded
39999 Unknown Error

Thursday, December 11, 2008

Unix Command - NFS mount

Solaris: mount -F nfs {nas_name}:{source_volume_directory} {target_directory}
Ex: mount -F nfs mynas:/vol/data_environment/env /opt/nascontent

Linux: Solaris: mount -t nfs {nas_name}:{source_volume_directory} {target_directory}

Unix Command - Print no.of CPUs & Memory

Print no. of CPUs
psrinfo -p

Print Memory
prtconf -v |grep Mem

RedHat - 32 or 64 bit?

Run command: uname -a

Output from 32 bit host:
Linux hostname 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:12 EDT 2008 i686 i686 i386 GNU/Linux

Output from 64 bit host:
Linux hostname 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

64 bit systems will have x86_64 in their output and 32 bit systems will not have this flag.

Cron

List crontab
crontab -l

Edit crontab
crontab -e

Syntax

*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0 - 6) (Sunday=0)
|     |     |   +------- month (1 - 12)
|     |     +--------- day of        month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

Enable cron in linux
Check the files cron.allow and cron.deny. Add users to cron.allow to allow to execute cron.

Newer›