08
May
Posted by
Jemshad O K Category:
linux,
tech
Though dot (.) is a valid character in a gmail id, gmail never really uses that. Instead, it ignores the dot(s) in the email address. This means that, if your email id is foo.bar@gmail.com, you can login to the same account as foobar@gmail.com, foob.ar@gmail.com or any combination like that. Now that is not really an advantage. Nobody would want to login to the same account with multiple ids.
Creating aliases for your gmail account using this feature:
The real advantage is when using the same email account for different use and avoiding clutter by setting up labels based on the To: address of the email. I can, for example, give foo.bar@gmail.com to my friends and foobar@gmail.com to others. After that, all I have to do is, setup filters so that all mail for foo.bar@gmail.com get labeled with ‘Friends’ and sorting becomes easy. You don’t need multiple email accounts. The position of the dot can be changed or more dots included to create more and more aliases for your email address. The fact that gmail ignores dot in the email address was told to me by Razee Marikar.

Tags:
a tip a day,
gmail,
linux
Related posts
07
May
Posted by
Jemshad O K Category:
linux,
tech
As well all know, the -c options of wc(1) command in linux gives the number of bytes in a file. wc -c never reads the entire file for counting the number of bytes. Instead, it does a stat on the file and gets the number of bytes occupied by the file. This is the case if we say wc -c file. Now consider the case of wc -c < file. That also gives the same output – the number of bytes occupied by the file. In this case, the difference is that, the redirection is setup by the shell and the contents of the file is fed to the stdin of wc. Some smart implementations of wc will figure out the actual filename by doing a stat on the stdin and gets the byte count by doing stat on the file. This is highly efficient compared to reading the entire file and counting the number of bytes. wc on latest linux distributions does this way. The same on FreeBSD or solaris will take longer time to execute the same command.
$ ls -lh somebigfile
-rw-r--r-- 1 jemshad jemshad 472M Apr 1 2009 somebigfile
$ time wc -c somebigfile
494786425 somebigfile
real 0m0.003s
user 0m0.000s
sys 0m0.004s
$ time wc -c < somebigfile
494786425
real 0m0.003s
user 0m0.000s
sys 0m0.004s
Source: #bash channel at irc.freenode.net

Tags:
a tip a day,
linux,
wc
Related posts
29
Jun
Posted by
Jemshad O K Category:
General
####[ GNU/Linux One Stanza Tip (LOST) ]#######################
Sub : Editing a file being viewed with less LOST #655
view or (vi -r) does not permit editing. To edit a file being
viewed with less pager, it is just a matter of pressing “v”.
You will have the file for edit under vi. On quitting, you
would return to the less pager again. (Same with more pager)
####[ usmbish (at) users.sourceforge.net ]####################

Tags:
linux,
lost,
tips,
tricks
Related posts