That's not devops - that's system administration. Not complaining; it's still a well-presented list.
Devops/Sysadmin Cheatsheet
51–60 of 110 posts
Re: Devops/Sysadmin Cheatsheet
#52This is just a small curated collection from myself and old friends — mainly rails devops. I'd be interested in hearing from other rails devs/ops what you use on the command line on a daily basis, what cool thing you know about that no one else does, etc! I'll be adding more as we go....
It would be nice if the title mentioned it was rails focused.
Though...the only way it's really "rails focused" is that the commands are collected over time and sourced from my fellow rails developer/sysadmins. A lot of these are basic/general linux commands.
Re: Devops/Sysadmin Cheatsheet
#53That's not devops - that's system administration. Not complaining; it's still a well-presented list.
Re: Devops/Sysadmin Cheatsheet
#54 du -h --max-depth=1 -x
I use this frequently to keep an eye on disk used by user directories. It returns the disk space used by each directory in the current directory.Re: Devops/Sysadmin Cheatsheet
#55That's not devops - that's system administration. Not complaining; it's still a well-presented list.
Thanks! You are completely right. Just basic sysadmin stuff. It's titled that way simply a) I thought I'd see if I could hang with the term and b) the "source" of these commands (including myself) are from developers who specialize in rails ops work (so we do write app code, but specialize on the server side)
Re: Devops/Sysadmin Cheatsheet
#56Earlier quoted context omitted.
If you are running sudo, the long-term payoff is probably higher if you never use sudo !!. The very small chance of a huge disaster is still a lot higher than up arrow. Unless you are on a laggy connection and up arrow delays and you push it twice and end up running the wrong command! If you have lots of jitter and lag, i suggest using Mosh which I've found to be amazingly awesome when using it on Amtrak's spotty fre…
I think it's meant for when you run a command normally, but then realize you should have sudoed (sudid?) it. Though in that situation, I would still be inclined to do "↑ esc a sudo ". It's not a lot more work, but it is a lot less uncertain.
Re: Devops/Sysadmin Cheatsheet
#57A little gotcha: "iptables -L" doesn't list the NAT table rules; do "iptables -L; iptables -t nat -L" instead.
I also almost always add '-n' to iptables commands to disable reverse name resolution, which can sometimes take a while. Similarly when calling netstat.
Re: Devops/Sysadmin Cheatsheet
#58A little gotcha: "iptables -L" doesn't list the NAT table rules; do "iptables -L; iptables -t nat -L" instead.
I also almost always add '-n' to iptables commands to disable reverse name resolution, which can sometimes take a while. Similarly when calling netstat.
Re: Devops/Sysadmin Cheatsheet
#59And I concur with the comments about "sudo !!" - !! in general I've totally removed from my UNIX vocabulary. At least do something like !?string[?]
Re: Devops/Sysadmin Cheatsheet
#60Earlier quoted context omitted.
I think it's meant for when you run a command normally, but then realize you should have sudoed (sudid?) it. Though in that situation, I would still be inclined to do "↑ esc a sudo ". It's not a lot more work, but it is a lot less uncertain.
Indeed. I find ctrl-p ctrl-a is faster than going to the cursors.