Live data from Hacker News

Lazy Linux: essential tricks for admins

ibm.com

21–30 of 54 posts

Re: Lazy Linux: essential tricks for admins

#21
post #19
post #17

Earlier quoted context omitted.

lsof, ngrep, history (only found out this one a month ago after 6 years of being a sysadmin)

What terrible names. Sorry, but from a non-Unix perspective, symbols such as 'lsof' and 'ngrep' seem arbitrary and nonsensical.

What, LiSt Open Files and Net grep (Global Regular Expression Print)?

They sound like fairly sensible abbreviations to me.

Re: Lazy Linux: essential tricks for admins

#22
post #21
post #19

Earlier quoted context omitted.

What terrible names. Sorry, but from a non-Unix perspective, symbols such as 'lsof' and 'ngrep' seem arbitrary and nonsensical.

What, LiSt Open Files and Net grep (Global Regular Expression Print)? They sound like fairly sensible abbreviations to me.

How about "listopenfiles" and "netfind"? And "list" instead of "ls", and "delete" instead of "rm", and... et cetera.

"Global Regular Expression Print" is a terrible name on its own, too.

Re: Lazy Linux: essential tricks for admins

#23
post #20
post #13

A better title: 9 interesting Linux commands and 1 reason to absolutely avoid CentOS.

You mean booting to singleuser? If you don't want it just use a grub password; nothing to do with CentOS.

Is the procedure for changing the root password with grub the same regardless of the flavour of Linux?

Re: Lazy Linux: essential tricks for admins

#24
post #22
post #21

Earlier quoted context omitted.

What, LiSt Open Files and Net grep (Global Regular Expression Print)? They sound like fairly sensible abbreviations to me.

How about "listopenfiles" and "netfind"? And "list" instead of "ls", and "delete" instead of "rm", and... et cetera. "Global Regular Expression Print" is a terrible name on its own, too.

See the thing is that if you're knee deep in an unfamiliar system trying to fix it you type "ls" about a dozen times a minute. Adding two unnecessary keystrokes (doubling the length!) not only adds up it makes typos more common.

There are some nice conventions though, once you know grep there's egrep, ngrep, etc. Then there's the -stat family, prstat, iostat, vmstat, mpstat, etc.

Grep is its own special case, I'm not going to argue that it's a good name a priori but it does have the benefit of being completely unique not to mention far too entrenched to change now. Not to mention that it's "burp" in Yiddish.

Unix is difficult to pick up but once your brain operates in that special warped way things do make sense by extension.

Re: Lazy Linux: essential tricks for admins

#25
post #24
post #22

Earlier quoted context omitted.

How about "listopenfiles" and "netfind"? And "list" instead of "ls", and "delete" instead of "rm", and... et cetera. "Global Regular Expression Print" is a terrible name on its own, too.

See the thing is that if you're knee deep in an unfamiliar system trying to fix it you type "ls" about a dozen times a minute. Adding two unnecessary keystrokes (doubling the length!) not only adds up it makes typos more common. There are some nice conventions though, once you know grep there's egrep, ngrep, etc. Then there's the -stat family, prstat, iostat, vmstat, mpstat, etc. Grep is its own special case, I'm not…

palish has a point to the extent that lsof is so infrequently used that it would do no harm to give it a more descriptive name.

Nonetheless, I entirely agree with you about ls, and about sticking to the conventions that have developed around unix.

Re: Lazy Linux: essential tricks for admins

#26
post #6

Trick 5 (opening a remote port on a "public" machine to connect back to your local machine) is great. Combine it: office$ ssh -R 9999:localhost:22 user@home ## do this in a screen for good measure and another lesser known ssh feature: home$ ssh -D 8888 -p 9999 user@localhost and now you have a SOCKS proxy on home:8888 that will access everything visible to the computer named "office". For extra credit add PingTunnel…

Yeah, that was exactly the one that stood out for me! I've wanted this several times recently, at work and at play.

Re: Lazy Linux: essential tricks for admins

#27
post #22
post #21

Earlier quoted context omitted.

What, LiSt Open Files and Net grep (Global Regular Expression Print)? They sound like fairly sensible abbreviations to me.

How about "listopenfiles" and "netfind"? And "list" instead of "ls", and "delete" instead of "rm", and... et cetera. "Global Regular Expression Print" is a terrible name on its own, too.

If that really bothers you, just alias those commands.

alias listopenfiles=ls

alias netfind=ngrep

...and so forth. I've done that to add the DOS "cls" command to clear my terminal screen. Also, I'm a Cisco admin, so I have aliased "en" to "su", and the reverse on Cisco switches and routers. Yes, Cisco also has the alias command in IOS.

Re: Lazy Linux: essential tricks for admins

#28
post #22
post #21

Earlier quoted context omitted.

What, LiSt Open Files and Net grep (Global Regular Expression Print)? They sound like fairly sensible abbreviations to me.

How about "listopenfiles" and "netfind"? And "list" instead of "ls", and "delete" instead of "rm", and... et cetera. "Global Regular Expression Print" is a terrible name on its own, too.

If you want user friendly, use the GUI. The commands are meant to be quick to write for frequent users, especially in the days when shells didn't do command completion.

Re: Lazy Linux: essential tricks for admins

#30
post #22

Earlier quoted context omitted.

How about "listopenfiles" and "netfind"? And "list" instead of "ls", and "delete" instead of "rm", and... et cetera. "Global Regular Expression Print" is a terrible name on its own, too.

If that really bothers you, just alias those commands. alias listopenfiles=ls alias netfind=ngrep ...and so forth. I've done that to add the DOS "cls" command to clear my terminal screen. Also, I'm a Cisco admin, so I have aliased "en" to "su", and the reverse on Cisco switches and routers. Yes, Cisco also has the alias command in IOS.

If unix were being designed from the ground up, today, user friendly commands, with aliases to power user abbreviations might make sense. It was, however, created some 30+ years ago.
Post reply on HN