[kwlug-disc] Linux & Linux admin for newbies

CrankyOldBugger crankyoldbugger at gmail.com
Tue Feb 6 10:55:38 EST 2018


I'm as big fan of:

alias ll="ls -halF"

at least on my RHEL/Fedora boxes at work.  I had gotten into the habit of
using ll in Ubuntu so I miss it on RHEL.

As I spend much of my time at work building new VMs, I use the following
command line operations to set up my .bashrc and .vimrc

echo 'alias ll="ls -halF"' >> /root/.bashrc
echo "set mouse-=a" >>/root/.vimrc
source /root/.bashrc

This allows me to add in my alias without having to open .bashrc in an
editor (and also modify vim the way I like it).




On Tue, 6 Feb 2018 at 09:20 Khalid Baheyeldin <kb at 2bits.com> wrote:

> 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'
>
>
> On Tue, Feb 6, 2018 at 3:50 AM, Ronald Barnes <ron at ronaldbarnes.ca> wrote:
>
>> John Johnson wrote on 2018-02-06 12:29 AM:
>>
>> After a fruitful chat with Paul at February's meeting I thought I would
>>> add one more topic to this thread.
>>>
>>> alias & .bashrc
>>>
>>> And a question: How does one set up an alias for a command line string?
>>>
>>
>> If it's a one-off, "alias" is the trick.
>>
>> i.e. let's create an alias called kwlug that does... something.
>>
>>
>> alias kwlug='pwd
>>> kwlug
>>>
>> /mnt/home-raid/ron/Documents/Toyota-4Runner
>>
>>
>> Right, so ... an aliased command called kwlug gives us our present
>> working directory.
>>
>> Useless, but illustrative.
>>
>>
>> Now, let's look at ~/.bashrc, where persistent aliases are defined, or
>> referenced.
>>
>> In my Ubuntu 16.04 .bashrc file is the following:
>>
>> # Alias definitions.
>>> # You may want to put all your additions into a separate file like
>>> # ~/.bash_aliases, instead of adding them here directly.
>>> # See /usr/share/doc/bash-doc/examples in the bash-doc package.
>>>
>>> if [ -f ~/.bash_aliases ]; then
>>>     . ~/.bash_aliases
>>> fi
>>>
>>
>> It's encouraging the user to place their alias definitions in
>> ~/.bash_aliases which gets run (if it exists) from .bashrc.
>>
>>
>> I prefer to define my aliases in .bash_aliases since I can transport them
>> between users / systems with minimal effort.
>>
>>
>>
>> I'm sorry I'm unable to present on this topic, but thought I'd throw this
>> out there just in case someone finds it a useful starting point.
>>
>>
>> Also, sorry for missing the february meeting.
>>
>> I'm knackered from gardening on sunday.  All the tulip bulbs were
>> sprouting (easily a hundred of them) and I had to get them into the soil.
>>
>> (It's my contractual obligation as a Vancouverite to bring this up, as I
>> see the KW temperature is currently -11°C; I feel terrible about it, but
>> what can I do?)
>>
>>
>> _______________________________________________
>> kwlug-disc mailing list
>> kwlug-disc at kwlug.org
>> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>>
>
>
>
> --
> Khalid M. Baheyeldin
> 2bits.com, Inc.
> Fast Reliable Drupal
> Drupal optimization, development, customization and consulting.
> Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
> Simplicity is the ultimate sophistication. --   Leonardo da Vinci
> For every complex problem, there is an answer that is clear, simple, and
> wrong." -- H.L. Mencken
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20180206/087946a0/attachment.htm>


More information about the kwlug-disc mailing list