Archive for the 'Uncategorized' Category

Change shell

Change shell command


chsh

Text type convert

Convert a text file format from MSDOS to UNIX


dos2unix input_file output_file

Remove Even Lines

This command removes all the even lines from the file given as the argument


cat example.txt|awk 'NR%2==1'

cmp Command – Compare Files

The command cmp is similar to diff:


# cmp file1 file2   
file1 file2 differ: byte 10, line 1

Google Reader Shortcuts

Some Google Reader Shortcuts

j/k item down/up selects the next/previous item in the list
s toggle star stars the selected item
shift-s toggle share shares the selected item
m mark as read/unread switches the read status of the selected item
v view original opens the original source for this article in a new window
shift-a mark all as read marks all items in the current view as read
1 expanded view displays the subscription as expanded items
2 list view displays the subscription as a list of headlines
r refresh refreshes the unread counts in the navigation
gh go to home goes to the Google Reader homepage
ga go to all items goes to the “All items” view
gs go to starred items goes to the “Starred items” view
u toggle full screen mode hides or shows the list of subscriptions
? keyboard shortcuts help displays a quick guide to all of Reader’s shortcuts

Original

Shortcuts – Hard and Soft Links in Linux

This is how to create hard and soft links in Linux. Remember, a directory cannot be hard linked.


#Hard link
ln /path/to/file.ext .

#Soft link
ln -s /path/to/file.ext .

[tags]link, shortcut, soft,hard,linux,command[/tags]

Directory Listing Only Search

The search that limits the results to just directory listings…

intitle:”index.of” inanchor:”Last Modified” inanchor:”Description” inanchor:”Parent Directory” -filetype:php -filetype:asp -filetype:htm -filetype:html -inurl:”index.of” search.string

Fetch columns of Output using Awk

One can use awk to get a specific column from a command output…

First column of the command
date|awk '{print $1}'

11th Column of the command
ps aux|awk '{print $11}'

Use a different Field separator
cat /etc/passwd|awk -F ':' '{print $1}'

[tags]awk,sed,shell,script,output,filter,text,cli,linux,string,separator[/tags]

Disable Password Prompt at Startup in Windows XP

Note: This post may be wrong. I’m getting a lot of complaints that this doesn’t work. See the Microsoft page on how to do this here

Disabling startup login prompt for password

  • Click Start and Run
  • Type “Control Userpasswords2” and press enter.
  • Uncheck the box for “Users must enter a user name and password to use this computer.”
  • Click Apply and Ok.

Please read the comments before following these steps – some comments have reported that this fix is causing a few issues.

Writing tips

Omit unnecessary words. Make every sentence contribute to the point you want to make. Use paragraphs as your arguments. Go through a piece and ask, is this word/clause/sentence/paragraph really necessary? Does it add to the reader’s understanding of the topic, or is it just wind? And once you’ve taken out any fluff, go over it again and ask, do my paragraphs flow clearly from one to the next? Do my arguments build logically on each other?

Avoid passive voice. Whenever possible, rewrite sentences to make them active. You can usually rewrite sentences that begin with “There is” or “There are” to make them more active.

Avoid future tense.

Avoid cliches and overused phrases such as “That’s where ProductX comes in,” “Enter ProductX,” and “last but not least.”

Spell out all abbreviations on first reference: “Open Source Technology Group (OSTG)”

Spell out words on first reference: say “application” before you refer to “apps.”

Spell out numerals less than 10, unless they refer to amounts with units. Use numerals for numbers greater than nine.

Original Article

[tags]english,writing,article,rules,blogging[/tags]