xubuntu Move to Trash recovery
Howto: Terminal tips and tricks
Xubuntu requires the terminal more than Ubuntu…so let’s have fun with it!
1) Move to Trash: Currently, Xubuntu doesn’t have an option to move files to the trash. You can, however, recreate it in the terminal:
First, create a file named /usr/bin/del:
sudo mousepad /usr/bin/del
Copy and paste the following into the file:
#!/bin/bash
mv -vi — “$@” $HOME/.Trash
Save, exit, and make the file executable. Run sudo chmod -v 755 /usr/bin/del.
Now, to move a file to the trash, just run del filename and it will be moved to the .Trash folder. If you’re used to DOS, using del will be easy for you.
2) Aliases: If you want to save some typing time, then aliases are for you. (Example: Rather than constantly typing sudo apt-get install, you can just type apt.)
To make an alias, edit the file ~/.bashrc, by running mousepad ~/.bashrc. The method is as follows:
alias aliasname='command'
aliasname being the name of the alias, and command being the command run when you type the alias. Example:
alias apt='sudo apt-get install'
Here are all of my aliases:
alias free='free -m'
alias kill=’pkill’
alias apt=’sudo apt-get install’
alias remove=’sudo apt-get remove’
alias search=’apt-cache search’
alias edit=’mousepad’
alias suedit=’sudo mousepad’
alias i=’sudo dpkg -i’
alias upgrade=’sudo apt-get upgrade’
alias dist-upgrade=’sudo apt-get dist-upgrade’
alias update=’sudo apt-get update’
alias clean=’sudo apt-get autoclean’
alias build-dep=’sudo apt-get build-dep’
alias df=’df -Hl’
alias home=’cd ~’
alias mktar=’tar -cvf’
alias mkbz2=’tar -cvjf’
alias mkgz=’tar -cvzf’
alias untar=’tar -xvf’
alias unbz2=’tar -xvjf’
alias ungz=’tar -xvzf’
alias ls=’ls –color=auto’
alias mv=’mv -i’
alias cp=’cp -i’
alias rm=’rm -i’
alias del=’rm -r’
alias sources.list=’sudo leafpad /etc/apt/sources.list’
alias menu=’edit .config/xfce4/desktop/menu.xml’
alias xorg.conf=’sudo leafpad /etc/X11/xorg.conf’
Just copy and paste these into your .bashrc file, and log in and out. Using the terminal is now a lot faster! (source taken from web source page I could not locate)
0 comments & suggestions:
Post a Comment