Some new aliases and seperated profiles
This commit is contained in:
@ -1,28 +1,36 @@
|
||||
#C Find all folders
|
||||
#C = custom (this whole files is custom)
|
||||
|
||||
# Some more ls aliases
|
||||
alias ll='ls -alFh'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
alias l.='ls -d .* --color=auto'
|
||||
|
||||
# Find all folders
|
||||
alias lsf="ls -alF | grep /$"
|
||||
|
||||
#C This is GOLD for finding out what is taking so much space on your drives!
|
||||
# This is GOLD for finding out what is taking so much space on your drives!
|
||||
alias diskspace="du -Sh | sort -n -r |more"
|
||||
|
||||
#C Command line mplayer movie watching for the win.
|
||||
# Command line mplayer movie watching for the win.
|
||||
#alias mp="mplayer -fs"
|
||||
|
||||
#C Show me the size (sorted) of only the folders in this directory
|
||||
# Show me the size (sorted) of only the folders in this directory
|
||||
alias folders="find . -maxdepth 1 -type d -print | xargs du -sk | sort -rn"
|
||||
|
||||
#C Easy move up directories
|
||||
# Easy move up directories
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias .....="cd ../../../.."
|
||||
|
||||
#C Make previous command sudo
|
||||
# Make previous command sudo
|
||||
alias s='sudo "$BASH" -c "$(history -p !!)"'
|
||||
|
||||
#C Rm wil now prompt for deletion and show output
|
||||
# Rm wil now prompt for deletion and show output
|
||||
alias rm="rm -v"
|
||||
|
||||
#C easy archive extract
|
||||
# easy archive extract
|
||||
extract () {
|
||||
if [ -f $1 ] ; then
|
||||
case $1 in
|
||||
@ -44,5 +52,22 @@ extract () {
|
||||
fi
|
||||
}
|
||||
|
||||
#C Create dir and cd into it
|
||||
function md () { mkdir -pv "$@" && cd "$@"; }
|
||||
# Create dir and cd into it
|
||||
function md () { mkdir -pv "$@" && cd "$@"; }
|
||||
|
||||
# easy apt-get
|
||||
alias apt-get='sudo apt-get'
|
||||
|
||||
# Calculator
|
||||
alias calc='bc -l'
|
||||
|
||||
# Show all open ports
|
||||
alias ports='netstat -tulanp'
|
||||
|
||||
# Show memory usage
|
||||
alias meminfo='free -m -l -t'
|
||||
|
||||
# Aliases for showing used harddisk space/files
|
||||
alias df='df -H'
|
||||
alias du='du -ch'
|
||||
alias du1='du -ch -d 1'
|
||||
|
@ -129,12 +129,6 @@ if [ -x /usr/bin/dircolors ]; then
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alFh'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
@ -1,26 +0,0 @@
|
||||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# set TERM to xterm-color to allow colors in the terminal
|
||||
TERM=xterm-color
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user