What are some common HDFS commands that can be mapped in the bash files? What are some common HDFS commands that can be mapped in the bash files? hadoop hadoop

What are some common HDFS commands that can be mapped in the bash files?


The good practice is to put aliases in .bash_aliases.

For your problem, I'd put alias h="hdfs dfs" in my .bash_aliases file (create it if it doesn't exist)

Most distribs will already have this in their .bashrc file but if it's not there, add

if [ -f ~/.bash_aliases ]; then    . ~/.bash_aliasesfi

in your .bashrc

Now you can either type source .bashrc or restart you terminal and h -ls wille be interpreted as hdfs dfs -ls

Note that cou can also very well put all of your aliases directly in the .bashrc, but I find it more convenient to have all the aliases set appart.

Are there any other useful commands that I can map here?

Look at this, it might give you some ideas : https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html

And you can add what you want so if you run a command really often you can consider adding it in your aliases.

Hope this helps!