Displaying keyword search results 51 - 60
Created by Dr. Xi on October 09, 2008 22:53:14 Last update: October 09, 2008 22:54:28
Sometimes you can't access a file because you don't have the right permissions. But if you are an administrator, you can take ownership of the file first then change the permissions to grant yourself access. From the command line, use takeown :
@rem take ownership of a single file takeow...
Created by Dr. Xi on October 06, 2008 22:48:08 Last update: October 06, 2008 22:50:11
A first attempt would be to create an input file like this:
userid password shell_command1 shell_...and feed the lines to the telnet client:
cat telnet_input.txt | telnet remote_host #...However, you'll learn soon enough that it doesn't work. You get output like this:
Trying 192.168.159.128... Connected to bash...What's happening? The telnet client depleted all input before the remote host had a chance to respond. Since there's no more input, the telnet client initiated to close the connection. Adding a delay between the commands makes it work:
(echo userid sleep 10 echo password ...How much time to sleep between commands is just guesswork. You can use Expect to provide more control over the automated session:
#!/usr/bin/expect # timeout script aft......
Created by Dr. Xi on September 29, 2008 23:05:12 Last update: September 29, 2008 23:06:16
These variables are set or used by the Unix shell to modify its behavior. Variable Description ENV=file Name of script that gets executed at startup; Usually, ENV=$HOME/.kshrc FCEDIT=file Editor used by fc (fix command) command. If $FCEDIT is not defined, use $EDITOR, otherwise use the default (vi or ed). FPATH=dirs Directories to search for function definitions; undefined functions are set via typeset -fu . FPATH is searched when these functions are first referenced. HISTFILE=file File in which to store command history. Default is $HOME/.sh_history for Korn shell, $HOME/.bash_history for Bash. If not set, history is lost after logout. HISTSIZE=n Max number of commands to keep in history. HOME=dir Home directory; set by login from passwd file. IFS='chars' Internal field separators. Default is space, tab, and...
Created by Dr. Xi on September 26, 2008 21:49:35 Last update: September 26, 2008 21:51:53
The ulimit command (builtin for bash ) controls resource limits available to the shell and subprocesses. ulimit -a displays all current limits.
peaches@peachesv:~$ ulimit -a core file siz...ulimit accepts options -H and -S , which specifies hard or soft limit. The resource options are listed below: Option Description -a All current limits are reported -c The maximum size of core files created -d The maximum size of a process’s data segment -e The maximum scheduling priority ("nice") -f The maximum size of files written by the shell and its children -i The maximum number of pending signals -l The maximum size that may be locked into memory -m The maximum resident set size -n The maximum number of open file descriptors (most systems...
Created by Dr. Xi on September 23, 2008 20:43:58 Last update: September 23, 2008 20:43:58
Variable Description $0 The name of the ruby script file $* The command line arguments $$ Ruby interpreter's process ID $? Exit status of last executed child process $_ String last read by gets $. Line number last read by interpreter $! Last error message $@ Location of error $& String last matched by regexp $~ The last regexp match, as an array of subexpressions $n the nth subexpression in the last match (same as $~ ) $= Sase-insensitivity flag $/ Input record separator $\ Output record separator
Created by Dr. Xi on September 22, 2008 01:22:23 Last update: September 22, 2008 16:20:01
On the Programs tab of Internet Options IE provides a list of HTML Editors to choose from. Choosing a program from the list will not change the View Source editor. It only changes the Edit with... command from the File menu. You need to modify the registry to add your favorite editor to the HTML Editors list. Add the keys listed below to the registry, or edit the registry keys in an editor and import back into the registry:
Windows Registry Editor Version 5.00 [HKEY_...Google " Internet Explorer Client Registry Layout " to find official information from MS.
Created by Dr. Xi on September 15, 2008 19:50:39 Last update: September 15, 2008 20:01:50
Create a properties file to hold the properties for the MailLogger:
MailLogger.mailhost=smtp.example.com MailLogger...Invoke from command line:
ant -DMailLogger.properties.file=C:\Build\MailLogg...Alternatively, invoke from another ant script:
<target name="build" depends="checkout"> <e...However, the built-in MailLogger doesn't override buildStarted . Therefore, you can't send email to notify of build starting with MailLogger . To achieve that, you can either use the Mail task or override MailLogger with your own derivative.
Created by Dr. Xi on September 10, 2008 03:37:17 Last update: September 10, 2008 15:48:31
Suppose you have a file with these lines:
-- contents of update_contact.sql update co...You can execute this script from the SQL prompt by entering:
@update_contact.sqlAnd it would execute fine. Now you get the contents of the script into the SQL buffer by:
GET update_contact.sqland use the / command to execute the buffer, you get ORA-00911 invalid character error for the semicolon at the first line. Confusing, right? It turned out that the semicolon is used by SQL*Plus to signify the end of a SQL command. When you enter SQL commands into SQL*Plus, it strips the trailing semicolon before sending the SQL command to the database. But when you import the contents of a file with the GET command, the semicolon is...
Created by Dr. Xi on September 10, 2008 03:09:23 Last update: September 10, 2008 03:26:29
SQL*Plus provides several commands to edit the SQL Buffer: LIST , ; or L - list all lines in the SQL buffer APPEND text or A text - add text at the end of the current line CHANGE/old/new or C/old/new - change old to new in the current line DEL - delete the current line The full list is available from Oracle docs. But I think it's far more efficient just to use the system editor you are familiar with for editing. Use DEFINE _EDITOR to set the editor to use, for example:
-- set editor to vi DEFINE _EDITOR = viEntering the EDIT SQL*Plus command will invoke the system editor. Use the SAVE command to save the SQL Buffer to a file.
Created by Dr. Xi on June 03, 2008 03:22:59 Last update: June 03, 2008 03:29:44
Right click the C: drive and view properties. Vista tells me that I'm using about 40GB of my hard drive. Since this is a new computer and I don't have a lot of media files, this doesn't sound right. So I added up the numbers from the folders under C:, it came up to about 18GB. Where did the rest of the used storage go? After some research, I found that there's a new thing called "System Restore and Shadow Copies" that can potentially use up a lot of disk space. And indeed it did.
C:\Windows\system32>vssadmin List ShadowStorage ...Running the "Disk Cleanup" tool brought the usage down to about 2G. Considering that the paging file used about 2G and giving some space for file...