Browsed by
Category: Linux

Difference Between &, &&, and ; in Bash

Difference Between &, &&, and ; in Bash

command1 & command2 will put command1 into the background and then run command2 Warning command2 will probably execute before command1 (just slightly). command1 && command2 && is the Boolean AND operator so command2 will only run if command1 returns a zero exit code (ie. runs successfully) command1; command2 ; is a command seperator, so it will run command1 then command2. So command2 will run even if command1 fails. command1 & start command in background, using nohup command1 & to make…

Read More Read More

Stop adding an entry to known_hosts for Dynamic IPs

Stop adding an entry to known_hosts for Dynamic IPs

Warning: Permanently added the ED25519 host key for IP address ‘[198.51.100.1]:1234’ to the list of known hosts. Is what I see when I connect to my parents house as they have a dynamic IP. Put CheckHostIP no in your ~/.ssh/config file. eg. Host * CheckHostIP no or Host dynamic.example.com CheckHostIP no It took me a bit of searching here is my source.

What’s the difference between sh, bash and zsh

What’s the difference between sh, bash and zsh

sh (or the Shell Command Language) is a programming language described by the POSIX standard. bash contains many more features including those of sh. Sometimes sh is symlinked to bash zsh (or the Z Shell) is like bash on steroids, slightly (word-splitting) incompatible with bash. If you are going this route, check out http://ohmyz.sh/ Sources: 1, 2

Per Directory umask

Per Directory umask

It’s not the right term, but I found what I was looking for. Hopefully this helps you too. setfacl -d -m group:name:rwx /path/to/your/dir ExplainShell | Source This does not work on OS X however: -bash: setfacl: command not found I did find this https://discussions.apple.com/thread/4805409?start=0&tstart=0