getenv programming

getenv(“POSIXLY_CORRECT”) = NULL The getenv() function searches the environment list to find the environment variable name, and returns a pointer to the corresponding value string. if the output is NULL then it means that POSIXLY_CORRECT environment variable is not set to true. so the current program may not try to run in strict POSIX mode. …

stty

ahiliation@debian:~$stty speed 38400 baud; line = 0; eol = M-^?; eol2 = M-^?; swtch = M-^?; ixany iutf8 ahiliation@debian:~$ stty – change and print terminal line settings http://tldp.org/HOWTO/Modem-HOWTO-7.html Clinton, Bill: I Have Sinned [audio:http://www.freeinfosociety.com/media/sounds/3815.mp3]

mode

Status for device COM1: ———————– Baud: 1200 Parity: None Data Bits: 7 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: OFF DSR handshaking: OFF DSR sensitivity: OFF DTR circuit: ON RTS circuit: ON Status for device COM2: ———————– Baud: 1200 Parity: None Data Bits: 7 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: …

fold

ahiliation@debian:~$fold -w 8 file edit view terminal help file edi t view t erminal help ahiliation@debian:~$ fold – wrap each input line to fit in specified width http://linux.about.com/library/cmd/blcmdl1_fold.htm

uptime

ahiliation@debian:~$uptime 07:30:51 up 47 min, 3 users, load average: 0.25, 0.13, 0.10 ahiliation@debian:~$ uptime – Tell how long the system has been running. http://uptime.netcraft.com/

chmod – change file mode bits

ABOUT chmod In Unix and Unix-like operating systems, chmod is the command and system call which is used to change the access permissions of file system objects (files and directories). It is also used to change special mode flags. The request is filtered by the umask. The name is an abbreviation of change mode.[1] TYPICAL …

directory permissions

ahiliation@debian:~$ chmod +t source/ ahiliation@debian:~$ ls -l total 12 drwxr-xr-x 2 ahiliation ahiliation 4096 2010-03-13 04:40 Desktop drwxr-xr-x 2 ahiliation ahiliation 4096 2010-03-13 19:20 Downloads drwxr-xr-t 2 ahiliation ahiliation 4096 2010-03-13 20:41 source t – Save text attribute (sticky bit) – The user may delete or modify only those files in the directory that they …

files.3

ahiliation:~$cat workethics.php ahiliation:~$php workethics.php The text has been savedahiliation:~$ ahiliation:~$cat workethics.txt Work ethics in QA Fashionahiliation:~$ http://www.phptutorial.info/learn/OpenReadCreate-files.php

files.2

ahiliation:~$php -r workethics.php Parse error: syntax error, unexpected $end in Command line code on line 1 ahiliation:~$vi workethics.php ahiliation:~$php workethics.php ahiliation:~$vi workethics.txt ahiliation:~$cat workethics.txt ahiliation:~$cat workethics.php http://bugs.php.net/

htdigest

debianlabs:~# htdigest -c password.txt knowledge.store jeffrin Adding password for jeffrin in realm knowledge.store. New password: Re-type new password: debianlabs:~# vi password.txt debianlabs:~# cat password.txt jeffrin:knowledge.store:64a3386f95d7380f0fe8d22cf81bec98 debianlabs:~# http://httpd.apache.org/docs/1.3/programs/htdigest.html