Notes by voodoo

Displaying keyword search results 1 - 10
Created by voodoo on February 16, 2012 14:56:44    Last update: February 16, 2012 15:52:56
Shell functions are declared using this syntax: [ function ] name () compound-command [ redirectio... Example: function ll { ls -alF $* } Example 2: ll() { ls -alF $* } Shell functions can be exported to subshells with the -f switch: $ export -f ll However , I had problems logging in Ubuntu 11.10 after I added this to .profile : export -f ll
Created by voodoo on January 03, 2012 08:41:21    Last update: February 16, 2012 15:50:06
This is the command to print all regular files in the src folder but excluding all files within the .svn folders: $ find src -name .svn -prune -o -type f -print where -o is the or operator. Define a shortcut: ff () { find $1 -name .svn -prune -o -...
Created by voodoo on November 22, 2011 12:27:12    Last update: November 22, 2011 12:31:50
Unix hidden files are named starting with a dot ".". To find hidden files in the current directory: $ find . -type f -name '.*' or $ find . -type f | grep \\/\\. To find hidden files in the marketing directory: $ find marketing -type f -name '.*' or $ find marketing -type f | grep \\/\\.
Created by voodoo on August 08, 2011 20:13:13    Last update: August 08, 2011 20:13:13
Find the package name: $ sudo apt-cache search pcre libpcre3 - Perl 5 ... Install the package: $ sudo apt-get install libpcre3-dev Reading pac...
Created by voodoo on July 21, 2011 08:12:39    Last update: July 21, 2011 08:12:39
RFC 1918 reserved three blocks of IP addresses for private internets. These come in handy when you create an internal IP network. Range RFC 1918 Name Description 10.0.0.0 - 10.255.255.255 24-bit block A single class A network number 172.16.0.0 - 172.31.255.255 20-bit block 16 contiguous class B network numbers 192.168.0.0 - 192.168.255.255 16-bit block 256 contiguous class C network numbers
Created by voodoo on June 14, 2011 15:16:30    Last update: June 14, 2011 15:18:18
Count the total number of lines of shell scripts (files ending with sh ): $ find . -type f -name \*.sh | xargs wc -l 2... Count the total number of lines for files under the src directory: find src -type f | xargs wc -l Count the total number of lines for files under the current directory whose path contains src/ : find . -type f -path \*src/\* | xargs wc -l
Created by voodoo on March 04, 2011 12:11:33    Last update: April 13, 2011 13:55:13
By default SELinux blocks execstack permission. According to Ulrich Drepper : "As the name suggests, this error is raised if a program tries to make its stack (or parts thereof) executable with an mprotect call. This should never, ever be necessary. Stack memory is not executable on most OSes these days and this won't change. Executable stack memory is one of the biggest security problems. An execstack error might in fact be most likely raised by malicious code." You can check if a library/application requires execstack by using the execstack utility: execstack -q PATHTOPROGRAM You can try to clean the flag and see if the application still runs: execstack -c PATHTOPROGRAM To allow execstack for cc1 : # grep cc1 /var/log/audit/audit.log | audit2allow ...
Created by voodoo on March 23, 2011 15:57:52    Last update: March 23, 2011 15:57:52
In the "Program search" (or Run) box, enter lusrmgr.msc to bring up the "Local Users and Groups" dialog. Double click the user name you want to set password never expire.
Created by voodoo on March 23, 2011 15:32:55    Last update: March 23, 2011 15:36:00
I got "Unknown SSL protocol error" when using curl to get the default page from iis 7 (of course, IE simply displayed "Internet Explorer cannot display the webpage"). The problem was that I used the default iis 7 certificate, which didn't have a name - and that caused SSL to fail. I created a new certificate with a name and that fixed the problem. # curl -v -k --dump-header - https://192.168.80.15... Other possible reasons: 3 Common Causes of Unknown SSL Protocol Errors with cURL
Created by voodoo on March 23, 2011 15:21:21    Last update: March 23, 2011 15:21:57
Open IIS Manager, select the server in the left panel. Double click "Server Certificates" in the right panel. In the server certificates dialog, right click and select "Create Self-Signed Certificate". Enter a name for the certificate and click OK. The certificate is valid for a year. Looks like MS doesn't offer you much option in creating a new certificate.
Previous  1 2 Next