This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
alias.linux
58 lines (55 loc) · 2.24 KB
/
alias.linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 foldmethod=marker filetype=bash
# ----------------------------------------------------------------------------
# Author: Mubarak Alrashidi (DeaDSouL)
# Package: dsBash
# Info: Setting up your bash environment
# License: GNU/GPL v3
# URL: https://gitlab.com/DeaDSouL/dsBash
# ----------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# ds.alias_linux: Show available LINUX aliases #{{{
ds.alias_linux() {
echo ""
echo -e "${BRED}L I N U X :${NC}"
echo -e "${BRED}-----------${NC}"
echo -e "${BRED}FILE AND FOLDER MANAGEMENT"
echo -e " ${BBLUE}ds.du${NC} ${FG}: ${NC}${PURPLE}'du'${NC} ${FG}with hidden files.${NC}"
echo ""
echo -e "${BRED}MISC."
echo -e " ${BBLUE}ds.info${NC} ${FG}: Print some useful system's informaton.${NC}"
} #}}}
# ------------------------------------------------------------------------------
# Files & Folders #{{{
# ds.du: du with hidden files/dirs #{{{
# http://askubuntu.com/questions/356902/why-doesnt-this-show-the-hidden-files-folders
alias ds.du='du -sch .[!.]* * |sort -h'
#}}}
#}}}
# Searching #{{{
#}}}
# Process management #{{{
#}}}
# Networking #{{{
#}}}
# System Operations & Information #{{{
#}}}
# Misc. #{{{
# ds.info: display useful host related informaton #{{{
ds.info() {
echo -e "\n${BGREEN}You are logged on ${NC}${FG}$HOSTNAME"
echo -e "\n${BGREEN}Additionnal information:${NC}${FG} " ; uname -a
echo -e "\n${BGREEN}Users logged on: ("$(w -h | wc -l)")${NC}${FG} " ; w -h
echo -e "\n${BGREEN}Current date :${NC}${FG} " ; date
echo -e "\n${BGREEN}Machine stats :${NC}${FG} " ; uptime
# MacOSX
#echo -e "\n${BGREEN}Current network location :${NC}${FG} " ; scselect
echo -e "\n${BGREEN}Public facing IP Address :${NC}${FG} " ; ds.myip2
# MacOSX
#echo -e "\n${BGREEN}DNS Configuration:${NC}${FG} " ; scutil --dns
echo ''
} #}}}
#}}}
# ------------------------------------------------------------------------------
# Auto flags
alias ls='ls --color=auto' # Adding colors
# ------------------------------------------------------------------------------