Live data from Hacker News

Unix Commands I Wish I’d Discovered Years Earlier

spin.atomicobject.com

31–40 of 259 posts

Re: Unix Commands I Wish I’d Discovered Years Earlier

#31
If anyone is interested there were several great posts on Hacker News a while about about useful UNIX commands [1, 2, 3]. I have also created several screencasts about command commands like the following [4], and one about the Filesystem Hierarchy Standard [5].

  ls man pwd cd top ps df du cp mv rm mkdir rmdir less cat vi
[1] https://news.ycombinator.com/item?id=6046682

[2] https://news.ycombinator.com/item?id=5022457

[3] https://news.ycombinator.com/item?id=4985393

[4] http://sysadmincasts.com/episodes/13-crash-course-on-common-...

[5] http://sysadmincasts.com/episodes/12-crash-course-on-the-fil...

Re: Unix Commands I Wish I’d Discovered Years Earlier

#32
post #16
post #12

Earlier quoted context omitted.

Counting number of files is probably not a sufficiently frequently used case to justify a new standard command. What part of piping concerns you?

It can be really slow, even for a few tens of thousands of tiles. I remember watching Nautilus's "properties" panel slowly count up the number of files and directories.

I'm not sure what this has to do with piping (why would nautilus pipe the output of find when doing a directory listing?), but I doubt it's the pipe that's causing performance issues. Uncached file system access has a tendency to be slow[0].

0 - https://gist.github.com/nahurst/3711264

Re: Unix Commands I Wish I’d Discovered Years Earlier

#33
post #15
post #9

I'm unreasonably excited about discovering xxd.

xxd is on OSX, but not on FreeBSD. Under FreeBSD, I always use 'hd somefile.bin'.

I have xxd on my FreeBSD setup.

    uname -rms
    FreeBSD 9.1-RELEASE-p19 amd64
Although the xxd man page doesn't have the BSD label, and is from 1996, so I'm not sure if xxd only recently found its way into FBSD.

    This manual page documents xxd version 1.7

    AUTHOR
       (c) 1990-1997 by Juergen Weigert

Re: Unix Commands I Wish I’d Discovered Years Earlier

#35
post #33
post #15

Earlier quoted context omitted.

xxd is on OSX, but not on FreeBSD. Under FreeBSD, I always use 'hd somefile.bin'.

I have xxd on my FreeBSD setup. uname -rms FreeBSD 9.1-RELEASE-p19 amd64 Although the xxd man page doesn't have the BSD label, and is from 1996, so I'm not sure if xxd only recently found its way into FBSD. This manual page documents xxd version 1.7 AUTHOR (c) 1990-1997 by Juergen Weigert

It maybe in ports, but it's not part of the base install:

    $ xxd
    xxd: Command not found.
    $ uname -rms
    FreeBSD 9.1-RELEASE amd64
edit: fixed typo where I put xdd instead of xxd

Re: Unix Commands I Wish I’d Discovered Years Earlier

#36

Unix and Common Lisp are similar in many ways: 1. Both are operating systems 2. Both are conceptually simple. 3. There is always nice command that does what you want but you somehow forget it. I can't believe that Common Lisp has just 900+ symbols but I routinely forget some of them when programming.

Indeed! Apropos is our friend.

Re: Unix Commands I Wish I’d Discovered Years Earlier

#40
post #39

I know it's not exactly an unknown command, but I didn't know about "sort" until last week. It's freaking fast and convenient, sorts hadoop reduce results like a champ.

Wow, I use it (almost) daily. Especially useful with the '-u' flag or uniq.
Post reply on HN