[juneau-lug] Re: aliases

  • From: Jamie <jamie@xxxxxxxxxxxxxxxxx>
  • To: juneau-lug@xxxxxxxxxxxxx
  • Date: Wed, 24 Nov 2010 08:40:47 -0900

Thanks Mark - that works perfectly.

Now I have 2 other aliases that don't work perfectly.  I wanted 
shortcuts for the newest files in a directory or the biggest ones.

These work in the current directory only
#newest files
alias nf='ls -lt $1 | head'
#biggest files
alias bf='ls -lS $1 | head'

but when used on a different directory:
> nf /tmp
> head: error reading `/tmp': Is a directory

Anyone - what am I doing wrong?  Omit the "| head" and they work.


On 11/23/2010 01:45 PM, Mark Neyhart wrote:
> As discussed at the latest JLUG meeting, here is how I make midnight
> commander change to the last used directory when it is exited.
>
> You want to add this alias to /etc/profile or a user specific profile.
>
> alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
>
>
>
> What mc-wrapper.sh does is call mc with the -P PathFileName option.
> The -P option causes mc to write the last used directory name to the
> specifed file upon exit.  The script then uses the file to change to
> that directory.  This works with Debian Lenny.
> ------------------------------------
> The Juneau Linux Users Group -- http://www.juneau-lug.org
> This is the Juneau-LUG mailing list.
> To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
> word unsubscribe in the subject header.
>    
------------------------------------
The Juneau Linux Users Group -- http://www.juneau-lug.org
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
word unsubscribe in the subject header.

Other related posts: