Monday, March 25, 2013
CmdLine --- check boot command line option
$cat /proc/cmdline
Changing default password and build it into RFS
1.
Run passwd – change root password
2.
Run passwd user – change ‘user’ password
3.
Copy /etc/shadow file into root filesystem
Monday, March 4, 2013
SVN Notes
[1] Thegeekstuff svn-command-examples
Ref
Removing files from SVN repo to synch with local folder
Ref
Removing files from SVN repo to synch with local folder
svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' )Adding files from local folder into SVN repo for unversioned files
svn add --force * --auto-props --parents --depth infinity
$ svn checkout/co URL PATH
$ svn co https://www.thegeekstuff.com/project/branches/release/migration/data/cfg /home/sasikala/cfg/
A /home/sasikala/cfg/ftp_user.cfg
A /home/sasikala/cfg/inventory.cfg
A /home/sasikala/cfg/email_user.cfg
A /home/sasikala/cfg/svn-commands
Checked out revision 811.
$ ls /home/sasikala/cfg
. .. .svn email_user.cfg ftp_user.cfg inventory.cfg svn-commands
$ svn commit -m "log messages" $ cat /home/sasikala/cfg/svn-commands checkout commit add delete update status $ ls -l /home/sasikala/cfg/svn-commands -rw-r--r-- 1 root root 41 Apr 16 11:15 svn-commands $ svn commit -m "Making the file empty" svn-commands Sending svn-commands Transmitting file data . Committed revision 813. $ svn list --verbose https://www.thegeekstuff.com/project/branches/release/migration/data/bin 16 sasikala 28361 Apr 16 21:11 README.txt 21 sasikala 0 Apr 18 12:22 INSTALL 22 sasikala Apr 18 10:17 src/ $ svn add thegeekstuff A thegeekstuff $ svn commit -m "Adding a file thegeekstuff" thegeekstuff Adding thegeekstuff Transmitting file data . Committed revision 814. $ svn delete thegeekstuff D thegeekstuff $ svn commit -m "Removing thegeekstuff file" thegeekstuff Deleting thegeekstuff Committed revision 814. $ svn diff filename $ svn -r R1:R2 diff filename $ svn diff thegeekstuff Index: thegeekstuff =================================================================== --- thegeekstuff (revision 815) +++ thegeekstuff (working copy) @@ -1 +1 @@ -testing +tester $ svn status PATH $ svn status /home/sasikala/cfg M /home/sasikala/cfg/ftp_user.cfg M /home/sasikala/cfg/geekstuff $ svn log PATH $ svn log thegeekstuff ------------------------------------------------------------------------ r815 | sasikala | 2011-04-16 05:14:18 -0700 (Sat, 16 Apr 2011) | 1 line Adding a file thegeekstuff ------------------------------------------------------------------------ $ svn move src dest $ svn move thegeekstuff tgs A tgs D thegeekstuff $ ls .# .. .svn email_user.cfg ftp_user.cfg inventory.cfg tgs $ svn update PATH $ svn update A new/usercfg A new/webcfg Updated to revision 819.
Sunday, February 17, 2013
Debugging Message Level addressed in standard.
http://en.wikipedia.org/wiki/Syslog
Severity levels
RFC 5424 defines eight severity levels:
| Code | Severity | Keyword | Description | General Description |
|---|---|---|---|---|
| 0 | Emergency | emerg (panic) | System is unusable. | A "panic" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call. |
| 1 | Alert | alert | Action must be taken immediately. | Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection. |
| 2 | Critical | crit | Critical conditions. | Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection. |
| 3 | Error | err (error) | Error conditions. | Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time. |
| 4 | Warning | warning (warn) | Warning conditions. | Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time. |
| 5 | Notice | notice | Normal but significant condition. | Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required. |
| 6 | Informational | info | Informational messages. | Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required. |
| 7 | Debug | debug | Debug-level messages. | Info useful to developers for debugging the application, not useful during operations. |
Monday, February 11, 2013
TCP port forwarding tool
RelayTcp
relaytcp.exe 20000 10.10.20.31 21000
forward all data on local 20000 port to dest pc on 21000 port
relaytcp.exe 20000 10.10.20.31 21000
forward all data on local 20000 port to dest pc on 21000 port
Thursday, January 24, 2013
Nano editor under Linux
[1] How to geek.
The Beginner’s Guide to Nano, the Linux Command-Line Text Editor
New to the Linux command-line? Confused by all of the other advanced text editors? How-To Geek’s got your back with this tutorial to Nano, a simple text-editor that’s very newbie-friendly.
When getting used to the command-line, Linux novices are often put off by other, more advanced text editors such as vim and emacs. While they are excellent programs, they do have a bit of a learning curve. Enter Nano, an easy-to-use text editor that proves itself versatile and simple. Nano is installed by default in Ubuntu and many other Linux distros and works well in conjunction with sudo, which is why we love it so much.
Running Nano
You can run nano in two ways. To open nano with an empty buffer, just type in “nano” at the command prompt.
You can also use the following syntax:
nano /path/to/filenameNano will follow the path and open that file if it exists. If it does not exist, it’ll start a new buffer with that filename in that directory.
Let’s take a look at the default nano screen.
At the top, you’ll see the name of the program and version number, the name of the file you’re editing, and whether the file has been modified since it was last saved. If you have a new file that isn’t saved yet, you’ll see “New Buffer.” Next, you’ll see the contents of your document, a body of text. The third-line from the bottom is a “system message” line that displays information relevant to the program executing a function. Here, you can see that it says “New File.” Lastly, the final two rows at the bottom are what make this program very user-friendly: the shortcut lines.
It’s a WYSIWYG editor; “what you see is what you get.” What you type directly goes into the text input, unless you modify it with a key like Control or Meta. It’s pretty simple, so type some text out, or copy something and paste it into your terminal so we have something to play with.
Shortcuts
Program functions are referred to as “shortcuts” in nano, such as saving, quitting, justifying, etc. The most common ones are listed at the bottom of the screen, but there are many more that aren’t. Note that nano does not use the Shift key in shortcuts. All shortcuts use lowercase letters and unmodified number keys, so Ctrl+G is NOT Ctrl+Shift+G.Hit Ctrl+G to bring up the Help documentation and scroll down to see a list of valid shortcuts.
When you’re done looking at the list, hit Ctrl+X to exit help.
Let’s say you’re working on a new text file, or “buffer,” and you want to save it. This is called “writing out” and is executed by hitting Ctrl+O. You’ll be prompted for a filename to use, and the shortcuts at the bottom will change to reflect what you can enter to complete this particular command.
If you want to insert the contents of another file into your current buffer, you’d type Ctrl+R.
You can cancel both of the previous commands by typing Ctrl+C.
You can hit Escape twice instead of holding down the Control key, if you have trouble doing that. There are also some commands that require use of the Meta key. On most keyboard layouts, Meta equates to the Alt button.
When you want to quit nano, you just hit Ctrl+X. Nano will politely ask you if you want to save your buffer, and you can cancel this action as well.
Navigation
Now that we’ve got a hang of shortcuts, let’s get used to moving around a text file very quickly. Of course, you can always use the Home, End, Page Up, Page Down, and the arrow keys to get around, but that requires moving your fingers from the letters that we all love so much.To move the cursor forward or backward, you can type Ctrl+F and Ctrl+B. To move up and down one line at a time, you can type Ctrl+P and Ctrl+N. In other words, you can use those keys instead of the Right, Left, Up, and Down arrows, respectively. Missing the Home and End keys? You can use Ctrl+A and Ctrl+E. Want to move pages at a time instead? Ctrl+V moves down a page, and Ctrl+Y moves up a page.
But wait, there’s more! To move forward and backward one word at a time, you can use Ctrl+Space and Meta+Space (remember, that’s Alt+Space). And, if you’re really in a rush, you can hit Ctrl+_ and then type in the line number, a comma, and the column number to jump straight there.
If you want to see where your cursor currently is, sort of like nano-GPS, hit Ctrl+C.
Copying, Cutting, and Pasting
When we want to copy text in graphical environment, we highlight it with the cursor. Similarly, in nano we “mark” it by using the Ctrl+^ command. You simply move the cursor to where you want to start marking, and then you hit Ctrl+^ to “set” it. This will mark everything between the starting point up to and NOT including the cursor.Note that the cursor is on the empty space, and copying/cutting will not include this space. You can also mark backwards from your “set” point. Be careful, however, as you can edit text while your marking. If you messed up, just hit Ctrl+^ again to unset the marker and you can start over.
To copy the marked text, hit Meta+^. If, instead, you want to cut the text, hit Ctrl+K.
To Paste your text, move the cursor to a suitable position and hit Ctrl+U.
If you want to remove an entire line of text, simply hit Ctrl+K without highlighting anything. This sometimes comes in handy when editing configuration files.
Some Extra Shortcuts
You know how in notepad, you can force long lines of text to wrap-around into what look like paragraphs? You can toggle that feature in nano with the Meta+L shortcut. Since line wrapping is set to “on” by default, this usually comes in handy in the opposite way; for example, you’re writing a config file and want to disable line-wrapping.You can see that the line the cursor is on has a “$” at both the beginning and end. This signifies that there’s more text both before and after the portion being displayed on screen.
If you want to search for a text string, hit Ctrl+W, and enter your search term. This search can then be cancelled mid-execution by hitting Ctrl+C without destroying your buffer.
The previous search term appears in the square brackets, and leaving the line blank and hitting Enter will repeat that last search.
And after you get really comfortable, you can turn that helpful section at the bottom off by hitting Meta+X to get more screen space for editing!
Some History
Nano was designed to be similar in look and feel to another program called Pico. Pico was the default text editor of Pine, an email program from back in the day that wasn’t distributed with a GPL-friendly license. This meant that redistribution was somewhat of a fuzzy area, and so the TIP project was born. “TIP Isn’t Pico” added some functionality that Pico lacked and was licensed for free distribution, and over time, became the nano we love to use today. For more information, check out the Nano Project’s History section on their FAQ.The strength of nano lies in its simplicity of use. The shortcuts work just like in GUI-based word processors like Word and Open Office, so it’s just a matter of learning which ones do what. Everything outside of that is just simple text-editing. Next time you have to edit stuff on the command-line, we hope that you’ll be more comfortable with it now that you’ve gotten familiar with nano.
Tuesday, January 15, 2013
Check Firfox plug-in update
Silverlight plug-in security issue can be checked on mozilla web site.
You can check silverlight plug-in by following link
https://www.mozilla.org/en-US/plugincheck/
Subscribe to:
Posts (Atom)