[kwlug-disc] Linux & Linux admin for newbies

bob+kwlug at softscape.ca bob+kwlug at softscape.ca
Tue Feb 6 20:48:30 EST 2018


To put a slightly different spin on this, have a look at this out of my .bashrc file:

ssa () 
{
        # Add the key to the ssh-agent for the passed number of seconds 
        /usr/bin/ssh-add -t $1 $HOME/.ssh/key.*
}

I think I came up with this when I needed to put parameters in the middle of the command and I couldn't figure out how with alias which was perfectly happy when the parameters came at the end of the line. Can alias actually do this?

BB


> -----Original Message-----
> From: kwlug-disc [mailto:kwlug-disc-bounces at kwlug.org] On Behalf Of Khalid
> Baheyeldin
> Sent: Tuesday, February 06, 2018 9:19 AM
> To: KWLUG discussion
> Subject: Re: [kwlug-disc] Linux & Linux admin for newbies
> 
> Here are aliases that I have on every machine I use, in ~/.bash_aliases
> 
> 
> # This makes upgrades a 2 letter affair, when I get a notification that
> packages are pending
> 
> alias af='sudo aptitude full-upgrade && sudo apt-get autoremove'
> 
> # Or you can do an update explicitly, then upgrade
> 
> alias auf='sudo aptitude update && sudo aptitude full-upgrade && sudo apt-
> get autoremove'
> 
> 
> # For Drupal, cache clearing aliases
> 
> alias cc='drush cache-clear'
> alias cca='drush cache-clear all'
> 
> 
> # Drupal code and db updates
> 
> alias upc='drush pm-updatecode'
> alias updb='drush updatedb'
> 
> 
> 

...






More information about the kwlug-disc mailing list