17 items tagged “unix”
2024
Reasons to use your shell’s job control.
Julia Evans summarizes an informal survey of useful things you can do with shell job control features - fg
, bg
, Ctrl+Z
and the like. Running tcdump
in the background so you can see its output merged in with calls to curl
is a neat trick.
2022
Bugs in Hello World. If a Unix program attempts to send its standard output to /dev/full it should return an error code. Many classic “hello world” programs fail to correctly handle this case.
2021
jc (via) This is such a great idea: jc is a CLI tool which knows how to convert the output of dozens of different classic Unix utilities to JSON, so you can more easily process it programmatically, pipe it through jq and suchlike. “pipx install jc” to install, then “dig example.com | jc --dig” to try it out.
2019
How FZF and ripgrep improved my workflow (via) I’m already a keen user of ripgrep (a crazy-fast grep alternative) but fzf was new to me: it’s a CLI utility that lets you pipe in a list of strings, then gives you a typeahead search interface to search and select a string before returning the selected string to stdout when you hit enter. This means you can pipe it together with other tools to add a dynamic selection step, which has all kinds of delightful combinations. “vi $(find . | fzf)” for example opens vi against the file you selected.
2017
Run the First Edition of Unix (1972) with Docker (via) This is so cool... just run “docker run --rm -it bahamat/unix-1st-ed” to drop into a simulation of a PDP-11 running genuine 1972 era Unix! If you haven’t got into Docker yet, Docker for Mac is a single click install these days and works incredibly well.
fd (via) “A simple, fast and user-friendly alternative to find.” Written in rust, with a less confusing default command-line syntax than the regular find command. Microbenchmark shows it running 7x faster. Install it on OS X using “brew install fd”.
2010
Is it important for modern programmers to know how to use Unix? Why?
I’d say yes. If you do any kind of server-side development, Linux/Unix etc UNIX (links to: /topic/Unix), etc., is where most of the exciting innovation is happening. Tools like HadoopApache Hadoop (links to: /topic/Apache-Hadoop), RedisRedis (links to: /topic/Redis), MongoDBMongoDB (links to: /topic/MongoDB), nginxnginx (links to: /topic/nginx), git etc Git (links to: /topic/Git-version-control-1), etc., all come from a Unix UNIX culture, and not knowing your way around a command line makes it much harder to get to grips with them.
[... 110 words]Running Processes. I’ve been searching for a good solution to this problem (“run this program, and restart it if it falls over”) for years. I’m currently using god which works pretty well, but according to this article I should be learning upstart instead. It never ceases to amaze me how difficult this is, and how obtuse the tools are.
2009
The Go Programming Language. A brand new systems programming language, designed by Robert Griesemer and Unix/Plan 9 veterans Rob Pike and Ken Thompson and funded by Google. Concurrency is supported by lightweight communicating processes called goroutines. “It feels like a dynamic language but has the speed and safety of a static language.”
Python is Unix. Jacob ports Ryan Tomayko’s simple prefork network server to Python.
I like Unicorn because it’s Unix. Ryan Tomayko analyses Unicorn, a new, pre-forking Ruby HTTP server that makes extensive use of Unix syscalls and idioms, and asks why dynamic language programmers don’t take advantage of these more often.
Perl 6: The MAIN sub (via) "Calling subs and running a typical Unix program from the command line is visually very similar: you can have positional, optional and named arguments." - that's exactly what I was thinking when I came up with optfunc.
python-daemon (via) A library for correctly creating Unix daemon processes in Python, implementing the proposed PEP 3143 API.
A Unix Utility You Should Know About: Pipe Viewer. Useful command line utility that adds a progress bar to any unix pipeline.
2008
lns (via) “a friendly program for making symbolic links”—it’s ln -s but it does the right thing no matter what order you put the arguments in. Love it.
The Cron Commandments. How to write well-behaved cron scripts, from Dean Wilson.