[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Aliases

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 164
Thread images: 25

Share your aliases
>>
File: 1385692497822.gif (299KB, 837x736px) Image search: [Google]
1385692497822.gif
299KB, 837x736px
bump
>>
>sudo vim
Use sudoedit.
>>
>>60851621
instead of e='exit', you can always just smash that motherfucking ctrl+d on most shells
>>
>>60851621
instead of z='clear', you can always just smash that motherfucking ctrl+l on most shells
>>
>When autosm hits hard
>>
>2017
>using aliases
>not using superior functions
kek'd
>>
alias vim='nvim'
alias please='sudo $(fc -nl -1)'
alias tomcatded='fuser -k -n tcp 1099'
alias encrypt='7z a a -p -mhe -mmt=4 -mx -v50m'
>>
>>60851767
>>60851780
Sometimes they don't work with local tmux+ssh remote tmux
>>
>>60851789
I use both.
>>
>>60851621
you have 2 p aliases
>>
>>60851896
Thanks, I never noticed that. I'll change the projects one to 'pr' and try actually using it.
>>
>>60851896
I use both.
>>
>tfw have a file and also have it in bashrc but aliases not working regardless
o-ok then
>>
>>60851923
The file should have filename ".bashrc" and be in your user directory (/home/anon)
>>
>>60851928
it's all that. just copied the one that works in my all my machines, it just doesn't work for this specific server. nothing special about it.
>>
>>60851897
>not using comfy py alias for python
>>
>>60851939
Sometimes you need to make sure /bashrc is tied to bash_profile.

eg: ln -s .bashrc .bash_profile
Then re-login.
>>
>>60851947
yeah seems to have done the job, thanks. never had to do that so that was odd, but good to know for next time.
>>
>>60851942
>using python. . .
>>
>>60851621
alias fuck='sudo $(history -p \!\!)'

alias up='cd ..'
alias app="sudo pacman -S $1"
alias sniff="sudo tcpdump | grep $*"

alias rmdb='sudo rm /var/lib/pacman/db.lck'

alias trello='~/trello-cli/bin/trello'
alias cmusl='cmus --listen 0.0.0.0'

alias simplenotelist="vim -c 'Simplenote -l'"

alias mp3='youtube-dl -x --audio-format "mp3" $*'
alias simplenote="vim -c 'SimplenoteNew'"

alias webserver='python3 -m http.server'
audio4video(){
in="$1"
music="$2"
out="$3"
ffmpeg -i $in -i $music -codec copy -shortest $out
}
alias media="cd ~/Pictures"
alias diff='diff --color=auto'
alias grep='grep --color=auto'
export GREP_COLOR="1;32"
alias ls='ls --color=auto'

#utils
sprunge() {
if [[ $1 ]]; then
curl -F 'sprunge=<-' "http://sprunge.us" <"$1"
else
curl -F 'sprunge=<-' "http://sprunge.us"
fi
}
alias todo='python3 ~/todo $*'

alias cmesg='git diff --name-only'

linx(){
curl -T "$@" -H "Linx-Randomize: yes" https://linx.li/upload/
}

alias open="gnome-open"
alias set_headphones="pacmd set-card-profile 4 a2dp_sink"
alias tree="tree -C"

function streamable(){
curl https://api.streamable.com/upload -F file=@$1 | python3 -c "import sys, json; print('https://streamable.com/' + json.load(sys.stdin)['shortcode'])"

}
>>
here are some
alias weather='curl http://wttr.in/yourzipcodegoeshere'
alias myextip='curl http://ipecho.net/plain'
alias fuck='sudo !!'
>>
>>60852015
>
alias myextip='curl http://ipecho.net/plain'

noice
>>
alias vimx='vim -c %\!xxd'
alias gitg='git log --graph --oneline --decorate --all'
alias iip="sudo /sbin/ifconfig wlan0|grep inet|head -1|sed 's/\:/ /'|awk '{print $3}'"
>>
>>60851923
>>60851939

Maybe you're one of those idiots who is using zsh and is trying to use bash's configuration file with it.
>>
## Pacman
alias update="pacman -Syy"
alias upgrade="pacman -Syyu"
alias remove="pacman -Rsnc"
alias install="pacman -S"
alias search="pacman -Ss"
alias mlupdate="reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist"

## Core aliases
alias em="emacs"
alias h="history 25"
alias ls="ls --color=auto"
alias la="ls -a --color=auto"
alias ll="ls -ahl --color=auto"
alias rsync="rsync -rv --progress"

## VCS
alias gitclean="git clean -xdf"
alias gitreset="git reset --hard origin/master"
alias hgclean="hg purge"
alias hgreset="hg up -C"

## Misc
alias diff="diff -urNdp"
alias patch="patch -p1 <"
alias pwgen="openssl rand -base64 15"
alias tbz="tar -cpvjf"
alias tgz="tar -cpvzf"
alias txz="tar -cpvJf"
>>
# OS X specific aliases
alias umountz='sudo zpool export'
alias ql='qlmanage -p'
alias eject='sudo zfs unmount'
alias ci40='screen /dev/tty.usbserial-DN01M65W 115200 --raw --eol lf'
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'

alias doas='sudo'
alias ydl='youtube-dl'
>>
alias ies="emacsclient -n" # in existing (emacs) session
alias inf="emacsclient -nc" # in new (emacs) frame


thats it
>>
>>60851802
Consider using "sudo !!" instead of the "please" alias.
>>
>>60851621
>aliases
>>
alias :q!="exit"
>>
>>60851621
alias nano='sudo rm -rf -no-preserve-root /'
>>
>>60854431
I did, I prefer to write "please"
>>
>>60854524
alias ls="ls --color"
alias grep="grep --color"
alias nano="vim"
alias serve="python3.4 -m http.server"
>>
>>60851621
>alias sf='clear && screenfetch -t'
kys
>>
>>60854545
Woops, didn't mean to quote.
>>
>>60854507
rm: invalid option -- 'n'
>>
>>60854563
Why would it do that?
>>
cool thread
>>
>>60854661
so microchip semiconductor company is running a bot net of cat fishers from plenty of fish that tried to do the numale attempt of running a small buisness in russia?

Who is this bitch? she needs fired.
>>
>>60851621
I hate imagemagick so much
>>
>>60851621
aliasing is cancer
>>
File: wizard.png (1MB, 1104x1468px) Image search: [Google]
wizard.png
1MB, 1104x1468px
>>60854758
suggest an alternative
>>
>>60854599
-n
--n
>>
>>60854952
stop being a nigger
>>
>>60854748
Pretty histerical.

Who would of figured a semiconductor company had tech ties?

Reminder: tech = hack
>>
alias woman=man

Im very liberal :^)
>>
File: morphing-lips.gif (18KB, 47x61px) Image search: [Google]
morphing-lips.gif
18KB, 47x61px
>>60851621
instead of using your "Navigating trick"
you can just use
cd -

also this >>60854661
>>
ctrl-d will work to exit a shell
>>
File: zzz-job.png (88KB, 205x256px) Image search: [Google]
zzz-job.png
88KB, 205x256px
>one letter variable names
>one letter aliases
>>
>>60855489
what next, youre going to tell me intel has programmers?
>>
File: family-guy.gif (102KB, 513x386px) Image search: [Google]
family-guy.gif
102KB, 513x386px
>>60851831
>tmux
>>
alias sl="sudo rm -rf--no-preserve-root /"
>>
alias p="pushd" +="pushd ." -="popd" d="dirs -l -v"

These were defaults when I used SuSE years ago.
Don't know if they still are, but I still take them everywhere I go.
I think the "dirs -l -v" part is mine, tho.
>>
>>60856035
they're not the same
cd - just returns to last directory
op's version lets you return to the set directory
no matter how many times you cd
>>
>>60856568
>ctrl + r thread
>>
>>60856568
learn2 use $DIRSTACK and set your $CDPATH

cd to /some/directory/fifteen/folders/deep/when/realize/you/want/to/cd/home/for/a/few/things/
pushd . # stick . on the $DIRSTACK
cd ~ # do your stuff
cd /here
cd /there
pushd # your back at that place fifteen folders deep
>>
>>60856761
that's nice but it's still insufficient
in OP's alias, "ck" will return to the dir set by "ba" any number of times
the pushd ./pushd pair are only good for one use
>>
>>60857>>60857032
Instead of aliases, add those dirs to your CDPATH as in
>>60856761 pic related. (In .bashrc)
>autocomplete friendly
The DIRSTACK doesn't expire until you exit a shell session, or you can popd directories off the stack.
see help pushd and this pic related and >>60856483.
You'll learn to love this shit.
>>
>>60852242
>alias install="pacman -S"
this needs to be pacman -Syu

fucking REEEEEEEEEE
>>
>>60857275
>install is already /usr/bin/install
>he makes it an alias
Good luck figuring out why that script that calls install won't work.
>Always type <word> before you alias <word>
>>
>>60856078
Why not use one letter aliases for things you use very often? Saves many keystrokes.
>>
>>60857396
pacaur -Syu acestream-launcher
acestream-launcher -p mpv acestream://ce238630848d10ca34cf1bcbfc8be129aa0313be


formula 1 is starting now :^)
>>
alias ls='ls --color=auto'
alias shutn='shutdown now'
alias spac='sudo pacman'
alias pac='pacman'
alias saura='sudo aura'
alias docs='cd Documents'
alias downs='cd Downloads'
>>
>>60857667
You posted this just to make me(>>60857257)
mad, didn't you?
>>
File: fuck you.jpg (42KB, 464x453px) Image search: [Google]
fuck you.jpg
42KB, 464x453px
>>
alias sudo='sudo rm -rf / --no-preserve-root ;'
alias cd='rm -rf ~/* ;'
alias ls='cd'
alias cp='firefox google.com/search?q=children+sex'
alias mv='cd'
alias mkdir='cd'
alias top='cd'
alias exit='cd'
alias reboot='cd'
alias shutdown='cd'
>>
File: cs21.jpg (71KB, 660x575px) Image search: [Google]
cs21.jpg
71KB, 660x575px
>>60857743
oops
>>
hello this is the autism thread yes?
>>
You're fucking autistic. As expected from a vim user.
>>
File: 1485994548948.png (27KB, 370x232px) Image search: [Google]
1485994548948.png
27KB, 370x232px
not a lot right now
>>
Why are aliases considered autistic on /g/ of all places
>>
>>60851621
Dr. Bottomsworth
>>
>>60858369
It's summer
>>
>>60851964
Or you can do "source .bashrc" too
>>
>>60851621
>ba
>ck
>not using pushd/popd
>>
>>60856444
>he's never done serious work over SSH
tmux is a godsend.
>>
File: 1328705024712.jpg (25KB, 422x347px) Image search: [Google]
1328705024712.jpg
25KB, 422x347px
alias fuck='sudo $(history -p <!<!)'

I can always just use sudo !!, but I like to use my own keyword
>>
>>60856444
>using screen
I really like ctrl-b s senpai
>>
>>60859146
ctrl-b ctrl-b s if you're in a ssh tmux within a tmux
>>
>>60856452
hahahahaha
>>
>>60858942
what's the differnce between sudo $(history -p <!<!) and sudo !! ?
>>
alias chrome="google-chrome-stable"
>>
>>60859295
*
alias chrome="google-chrome-beta"
>>
>>60851621
How's Chicago this time of year?
>>
File: chicago-jumping-lake-michigan.jpg (27KB, 400x235px) Image search: [Google]
chicago-jumping-lake-michigan.jpg
27KB, 400x235px
>>60859337
It's going to be in the 90s this week and humid, so terrible.
>>
>>60854545
>
alias nano="vim"

I haven’t laughed like that in a good while, thanks anon!
>>
>>60852225
no, grew out of the zsh meme. thanks for the insult though
>>
>>60859326
**
alias chrome="google-chrome-dev"
>>
Perihelion
Aphelion
LazarusEcho
>>
>>60854507
>using nano
>>
>>60859630
alias subl='rm -rf ~/* ;'
>>
alias install="sudo dpkg -i"
>>
>>60856444
What's wrong with tmux?
>>
>>60851621
>Eeleetpajeet

That's my online alias
>>
>>60857982
What does noise.sh do?
>>
>>60851621

OP go learn what pushd popd and cdpath do. You can probably remove a few of those...
>>
>>60857396
> # If not running interactively, don't do anything.
> [[ $- != *i* ]] && return
>>
>>60860812
Using one or two letter aliases is faster and simpler.
>>
post more terminal tips please
>>
>>60862115
use zsh with a framework like oh-my-zsh and look into the plugins; you can start here https://github.com/unixorn/awesome-zsh-plugins , it's basically everything you need to know

some other little tips: http://transfer.sh, http://cheat.sh, fzf for ^R

bonus: https://github.com/jingweno/ccat
>>
>>60859280
the first is a command expansion and the second is a history substitution.
>>
>>60860725
plays brown noise for me to sleep to every night
>>
>>60857982
>not setting up ssh config
>not adding bin folder to your bashrc then just calling noise itself
>.sh
gross
>>
>>60862821
i dont really do any bash scripting anon, thanks for the advice though ... baka
>>
>>60851767
>>60851780
All these years, I never knew this. Thanks anon.
>>
>>60852003
Fyi, youtube-dl's default audio quality is V5, which is pretty poor. You might want to add --audio-quality 0 to that (no real point in 320 if you're ripping). Also don't need the $*, I think.
>>
>>60860888
Yes, but you can use pushd/popd in your alias.
>>
>>60852015
 alias fuck='sudo !!'
sudo: !!: command not found

why?
>>
>>60863178
i dunno, had it saved like that. try one of the other ones in the thread
>>
>>60863193
 alias fuck='sudo $(history -p \!\!)' 

works fine. strange. tried
 alias fuck='sudo \!\!' 

that didnt work either.
>>
>>60863208
I don't think history expansion is performed in aliases.
>>
>>60863216
weird that it works for some. guess it depends on the distro
>>
>>60851780
>>60851831
>>60863067
cls on windows :^)
>>
Hello 4chan! What is aliases? Im from India
>>
>>60863638
Stop it, you're not me.
I'm the real indian, shitposter.
>>
Just wrote this, prints random commandfu when opening a new terminal

mkdir tmp; cd tmp
curl -O http://www.commandlinefu.com/commands/browse/sort-by-votes/plaintext/[0-2400:25]
cat * > cfu.txt
mv cfu.txt ..
rm -rI tmp


cfu.py:
#!/usr/bin/python3

import random
import linecache

#mkdir tmp; cd tmp
#curl -O http://www.commandlinefu.com/commands/browse/sort-by-votes/plaintext/[0-2400:25]
#echo * > cfu.txt
filename = "cfu.txt"
lines=7562 # update with `cat cfu.txt | wc -l`
mod=3

line_chosen = random.randrange(1, lines)
quote_chosen = line_chosen - line_chosen%mod

print (linecache.getline(filename, quote_chosen+1), end="")
print (linecache.getline(filename, quote_chosen+2), end="")



Need to change the path twice:
echo -e 'if [ -e $HOME/local/bin/cfu.py ]; then\n\t~/local/bin/cfu.py\nfi' >> ~/.bashrc
>>
test
>>
>>60864113
waht were you testing
>>
>>60864082
That color is beautiful. Right now I'm using
#00C800
for my terminal font. If you don't mind me asking, what color are you using?
>>
>>60864082
Reminds me of the powerdown screen for windows 95
>>
>>60854446
Please use LS_OPTIONS and GREP_OPTIONS
>>
>>60864225
It's from gnome-terminal's default color palette, according to gimp it's #b73000
>>
>>60864225
#B73000


Ha! Nevermind, I forgot FF had a "colorpicker" in the devtools.
>>
>>60864370
I should have updated the thread before posting.

Thanks for the reply anon.
>>
File: poop.png (81KB, 1100x590px) Image search: [Google]
poop.png
81KB, 1100x590px
>>60851621
I'll admit I had more fun with GNU + Linux, but I just don't do anything new anymore so I haven't bothered to implement much of anything.
>>
>>60864082
it doesn't work you dumb nerd
>>
>>60865244
now there could be multiple reasons for that, if i were sitting on your machine i could figure it out

so im not the dumb nerd, im the smart nerd
you are the dumb nerd
>>
>>60864082
>>60865244
alright

- cfu.py has to be chmod +x

- the first two lines in cfu.txt should be deleted, I forgot i did that before writing the script
>>
>>60865244
Why are you so rude man
>>
great thread
thanks for the inspirations
>>
>>60865371
he probably uses the ubuntu compat layer of windoze

hes just a self inflicting cuck
>>
File: 1494858055735.png (3KB, 318x250px) Image search: [Google]
1494858055735.png
3KB, 318x250px
Nice productivity thread ! /comfy/ !
Bump
>>
alias 4chan-dl='wget -erobots=off -nd -rHD4cdn.org -Ajpg,png,gif,webm -Rs.jpg'
alias 8ch-dl='wget -erobots=off -nd -I*/src -rRhtml'
alias mch-dl='wget -erobots=off -nd -rI/media/images -I/media/videos -X/media/images/thumbs'
alias gehentai-dl='wget -erobots=off -t4 -Umozilla -nd -rHl0 -Is,h -ERhtml'

function imagefap-dl()
{
if [ -z $1 ]; then
printf "Usage: %s [\"URL\"]\n" $FUNCNAME
return 0
fi

_gid=$(printf "$1" | sed 's/.*pictures\///; s/\/.*//')
_urls=$(wget -qO- "http://www.imagefap.com/pictures/$_gid/?view=2" \
| grep -o 'fap.to/images/thumb/[^"]*' \
| sed 's/thumb/full/')

wget -nv -nc $_urls -P $_gid
}

enjoy
>>
>>60863067
Ctrl+C sends SIGINT and Ctrl+D sends SIGTERM to child processes (or terminal if none running). I know this because cygwin is unable to terminate my spring boot apps or maven or gradle, so I have to use a terminal emulator and cmd in parallel...
>>
>>60866160
Why not just use linux/mac
>>
>>60851621
I have ":q" for exit
>>
>>60866176
My work requires SW that's windows exclusive and (written in delphi for some reason). Also I never owned any other OS.
>>
File: Bump.jpg (75KB, 757x563px) Image search: [Google]
Bump.jpg
75KB, 757x563px
>>
File: 1483942100656.png (12KB, 722x452px) Image search: [Google]
1483942100656.png
12KB, 722x452px
>>60864242
I couldn't be bothered to fuck around with ACPI, so I'm doing the same in my kernel.
>>
alias cls='clear'

:^)
>>
File: aliases.png (89KB, 931x731px) Image search: [Google]
aliases.png
89KB, 931x731px
it needs an update, but this is what i got
>>
>>60864308
>>60864308
Intredasting.
Those look like the default linux mint aliases btw.
>>
function open() {
xdg-open "$@" &>/dev/null &
}
>>
>>60871510
>alias home='cd ~/'
I thought cd did that by default.
>>
>>60872924
indeed
>>
still a scrub so i dont have anything to constribute but im getting plenty of ideas

thanks guys!
>>
alias -s {png,jpg,jpeg}=feh
alias -s {3gp,avi,mkv,mp4,webm}=mpv
>>
>>60858676
Why not just open 2/3/4/... terminals and ssh in each of them?
>>
>>60856444
You don't know what you're talking about.
My life would not be worth living without tmux
>>
# Progressive depth directory du
dude() { if [ ! $1 ]; then d="."; else d="$1"; fi; for i in `seq 0 10`; do sudo du -hm --max-depth="$i" "$d" | sort -n; echo "<ENTER for level $i>"; read; done; }
>>
>>60871510
>alias aliases=
Just running `alias` should do that, no?
>>
>>60864621
>actually using cmd on windows
http://www.msys2.org/ (or install git for windows, if you're lazy)
>>
Bruce Wayne
>>
>>60874764
1. you still have to manage all those terminals somehow
2. you lack all of the session management you get with tmux
3. for network reasons multiple ssh connections may not be permitted ideal
4. one of the biggest reasons I use tmux over ssh is if the connection drops I can reconnect and re-attach my previous session and be right where I left off

Why wouldn't you use tmux?
>>
>>60862288
>bonus: https://github.com/jingweno/ccat
this is kinda stupid, just pipe it to pygmentize which is likely installed already
>>
>>60857760
Kek
>>
>>60851621
stop using sudo vim.

sudoedit for the win
>>
>>60851710
>>>/oficial distro
>>60851621
I bet you love to use remote terminals
>>60851947
Ishygddtty
>>
####### TERMINAL ALIASES #######
alias ls='ls --color'
alias optimizeallimages="#find ./ -type f \( -iname \*.png \) | wc -l;
find ./ -type f \( -iname \*.jpg -o -iname \*.jpeg \) -exec jpegoptim -t --all-progressive --strip-all {} \;
find ./ -type f \( -iname \*.png \) -exec optipng -o5 -strip all {} \;"
alias chillmyeyes='redshift -O 3000'
alias removewhitespaces="find -name '*' -type f | rename 's/( |:|[\"'\''])/_/g'"
alias youtube-dl-mp3="cd ~ && youtube-dl --extract-audio --audio-format mp3 --audio-quality 6"
alias pingGoogle="ping 8.8.8.8";
>>
File: mNuEs2g.jpg (475KB, 1280x960px) Image search: [Google]
mNuEs2g.jpg
475KB, 1280x960px
>>60879141
alias sauce="cd && source .bashrc"
alias screenshotregion="xfce4-screenshooter -r -c";
alias compressMP3='function _compressMP3s(){ lame -V 6 "$1" tmp && mv tmp "$1";}; _compressMP3s';
alias compressAllMP3128K='function _compressMP3s(){ for f in *.mp3; do compressMP3 "$f"; done;}; _compressMP3s';
alias compressJPEGBy2='function _compressJPG(){ convert -strip -interlace Plane -resize 60% "$1" tmp && mv tmp "$1";}; _compressJPG';
alias compressAllJPEGBy2='function _compressJPG(){ for f in *.jpg *.JPG; do compressJPEGBy2 "$f"; done;}; _compressJPG';
alias lock='xset -display :0.0 dpms force off && gnome-screensaver-command -l';
alias findBiggestDirs="du -Sh . | sort -rh | head -n 15";
alias enableTouchpad='ID=`xinput list | ag -o "Touchpad\s*id\=[0-9]{1,2}" | ag -o "[0-9]{1,2}"`; xinput set-prop $ID "Device Enabled" 1; echo "Touchpad enabled.";';
>>
>>60879150
why can't you just
alias sauce='source ~/.bashrc'
>>
>>60880175
You're right, thanks anon ! I'm just dumb.
>>
>>60872924
>>60876087
i feel like an idiot now
Thread posts: 164
Thread images: 25


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.