usernamenumber: (devi)
I've got a thing running that involves downloading a whoooole lot of data. Unfortunately the tool in question (apt-mirror) doesn't always provide frequent feedback, leading to the age-old question: is the program stuck, or just taking a while?

This turned out to be a situation where the random bits of Linux trivia I've gathered over the years came in handy enough that I thought I'd write up a quick explanation.

Ok, so...

PROBLEM:
A program is either hung, or just taking a while to download data.

SOLUTION (the short version):Cut for gratuitous use of command-line magic )

This whole experience really reminded me of a lot of the reasons why I love working in Linux. It's not always the most intuitive or friendly environment, but the more progress you make along its learning curve, the more interesting little nooks and crannies there are, and the more useful things you can do with them!
...while I talk about something, like, 5 people are going to care about:

I always tell my students that what makes Linux's learning curve worthwhile, particularly for sysadmins, is how phenomenally lazy it lets you be once you've overcome it. Case in point, I needed to copy a PDF to a system that I could only reach by way of another system. Sure, I could have copied it to systemX, then ssh'd in and from there copied it to systemY, but that's tedious. We hates tedium. How about this instead?

[brad@foo ~]$ cat file.pdf | ssh systemX "cat | ssh systemY 'cat > file.pdf'"

The rabbit hole, it goes deep.

Profile

usernamenumber

October 2016

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 16th, 2025 12:42 pm
Powered by Dreamwidth Studios