[sf-lug] My favorite simple little Linux tips
Michael Shiloh
michaelshiloh1010 at gmail.com
Fri Jul 30 16:49:13 PDT 2010
One of my favorite tips is "reset". Not because you use it often, but
because when you need it, you usually can't look it up because your
screen is messed up.
I guess nowdays you'd simply close the messed up window and open a new
one, but sometimes that is undesirable, e.g. if you have a particular
history of tricky commands.
I can't remember the last time time I used this command, but it was on a
windowed system and I'm glad I still knew how to use it.
Other favorites include:
history
!!
!$
man ascii
and of course
vi
Michael
On 07/30/2010 04:33 PM, testcore at gmail.com wrote:
> Thanks for the tips, Mike. Even after a few years, I realize I still don't know all the shortcuts.
>
> But, you didn't mention one of my favorites that I've found to be obscure (maybe not for this list, but eh). If you want to perform the same command, only with one change, instead of scrolling up and then typing the change, I use this:
>
> ^oldVal^newVal
>
> I find it most useful when I check a file via 'ls', and then want to inspect the contents via 'less':
>
> ls myfile
> ^ls^less>Evals to 'less myfile'
>
> Cheers,
> Alex
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: Mike Higashi<mhigashi at gmail.com>
> Sender: sf-lug-bounces at linuxmafia.com
> Date: Fri, 30 Jul 2010 15:38:42
> To: SF-LUG<sf-lug at linuxmafia.com>
> Subject: [sf-lug] My favorite simple little Linux tips
>
> As time goes by, I'm always surprised to learn that there are Linux
> users who still don't know about some of the simplest Linux tips.
> Here are a few of my favorites:
>
>
> 1) Don't use www.google.com to search for Linux related subjects.
>
> Got your attention? Good, because the search page you really need
> to use is: www.google.com/linux
>
> This brings you to Google's Linux-specific search engine, which
> includes results from forums and mailing lists, and excludes
> non-related subject matter that happens to include the same
> search terms.
>
> (Especially valuable for excluding web pages that cover the same
> topic for proprietary operating systems.)
>
> This ranks as my all-time favorite tip for Linux users.
>
>
> 2) Did you just use the 'cd' command to change directories, and
> want to return to the previous directory? Use 'cd -' to revert back
> to where you were before.
>
> This is such a simple trick that I've been assuming that most
> Linux users who were familiar with the command line already
> knew about it, but found out recently that this is not always
> the case.
>
> This tip is especially valuable if the directory name involved is a
> long one, as it saves a huge amount of typing.
>
> Only the most recent directory name is saved, so if you are in
> the directory "foo", execute 'cd ../bar', followed by 'cd ../baz',
> typing 'cd -' once will flip you back to "bar", and then a second
> time will put you back into "baz". The directory "foo" is no
> longer reachable with this technique.
>
> (To switch back and forth between more directories, study up
> on the 'pushd' and 'popd' commands.)
>
>
> 3) When using vim, instead of typing ':wq' to save your work and
> quit, type 'ZZ' instead.
>
> This is another so-simple-it-doesn't-need-repeating tip, except
> that a few months ago I was working with a programmer who
> used vim but didn't know about it, so I figure it's worth including
> here.
>
>
> Mike
>
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/
>
--
Sent from my ASR-33
More information about the sf-lug
mailing list