[sf-lug] My favorite simple little Linux tips

Alex Kleider a_kleider at yahoo.com
Fri Jul 30 18:29:10 PDT 2010


try it, Jim:
$ ls my_file
$ ^ls^less

and then watch the magic on the screen:-)
(substitute an existing short text file for "my_file")

It's similar to 
:s/old_string/new_string
when using vim

..by the way, I did not know about this and am very happy to learn about it and some of the other tips that have been mentioned in this thread.
Thanks to the contributers.
Does anyone else have similar tips that some of us newer to Linux may have forgotten or never known?

cheers,
alex


a_kleider at yahoo.com


--- On Fri, 7/30/10, jim <jim at well.com> wrote:

> From: jim <jim at well.com>
> Subject: Re: [sf-lug] My favorite simple little Linux tips
> To: testcore at gmail.com
> Cc: "SF-LUG" <sf-lug at linuxmafia.com>, sf-lug-bounces at linuxmafia.com
> Date: Friday, July 30, 2010, 5:35 PM
> 
> i don't know what the notation means. 
> 
> ^ means what 
> ^ls^less behaves how? 
> 
> with thanks 
> 
> 
> 
> On Fri, 2010-07-30 at 23:33 +0000, 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/
> > 
> 
> 
> 
> _______________________________________________
> 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/
> 


      




More information about the sf-lug mailing list