As a linux user I always prefer using command line than gui. So in some cases file copy, move, delete can cause lot of troubles and loses so that those commands has to be used in a secure or careful maner.
Since I'm a nut there is no support from my side to be careful when Im using the commands. So i found a simple method to how to be careful when im copying, moving and deleting files and folders.
Alias can be used be used to run combined commands and strings etc..
for example alias ls='ls -l'
now when ever you run ls it will run as ls -l so that you dont have to type long commands for nearly 1km.
when copying/moving/deleting if you put -iv as parameters then because of i it will ask whether to overwrite or delete, according to the operation. And v is verbose which will show what is happening so you can understand very easily.
example : alias mv='mv -iv'
will create and alias to mv command so the user will get more time and understanding, which will happen.
and you can create aliases for other commands too.
alias cp='cp -iv'
alias rm='rm -iv'
have exploring linux from command line :D
No comments:
Post a Comment