Add aliases to Ubuntu

In the .bash_profile file add a line like this:

alias emptytrash=”rm -rf ~/.local/share/Trash/files/*”

Where emptytrash is the name of the alias.

In the terminal:

source .bash_profile

Done! Now after entering emptytrash the garbage c…


This content originally appeared on DEV Community and was authored by Vadim Filimonov

In the .bash_profile file add a line like this:

alias emptytrash="rm -rf ~/.local/share/Trash/files/*"

Where emptytrash is the name of the alias.

In the terminal:

source .bash_profile

Done! Now after entering emptytrash the garbage can will be cleared.

If you use zsh, then instead of .bash_profile - make changes in .zshrc.


This content originally appeared on DEV Community and was authored by Vadim Filimonov


Print Share Comment Cite Upload Translate Updates
APA

Vadim Filimonov | Sciencx (2022-03-22T21:07:05+00:00) Add aliases to Ubuntu. Retrieved from https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/

MLA
" » Add aliases to Ubuntu." Vadim Filimonov | Sciencx - Tuesday March 22, 2022, https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/
HARVARD
Vadim Filimonov | Sciencx Tuesday March 22, 2022 » Add aliases to Ubuntu., viewed ,<https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/>
VANCOUVER
Vadim Filimonov | Sciencx - » Add aliases to Ubuntu. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/
CHICAGO
" » Add aliases to Ubuntu." Vadim Filimonov | Sciencx - Accessed . https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/
IEEE
" » Add aliases to Ubuntu." Vadim Filimonov | Sciencx [Online]. Available: https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/. [Accessed: ]
rf:citation
» Add aliases to Ubuntu | Vadim Filimonov | Sciencx | https://www.scien.cx/2022/03/22/add-aliases-to-ubuntu/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.