Add an up function, to cd .. several times
This commit is contained in:
parent
3ca0ff51bb
commit
bec0c679e6
1 changed files with 13 additions and 0 deletions
13
.bashrc
13
.bashrc
|
|
@ -53,6 +53,19 @@ function del()
|
|||
done
|
||||
}
|
||||
|
||||
# go up n directories
|
||||
up()
|
||||
{
|
||||
local str=""
|
||||
local count=0
|
||||
while [[ "$count" -lt "$1" ]] ;
|
||||
do
|
||||
str=$str"../"
|
||||
let count=count+1
|
||||
done
|
||||
cd $str
|
||||
}
|
||||
|
||||
# move backup files to trash
|
||||
alias clean='mv *~ ~/.Trash/'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue