Reputation
527
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
2 8 15
Newest
 Critic
Impact
~100k people reached

Mar
10
comment How can I get recursively list an apt package's dependencies with their installed versions?
Nice, I didn't know about that tail option! In my situation, I only care about installed packages, but the solutions for not-installed packages might prove useful too.
Mar
9
comment How can I get recursively list an apt package's dependencies with their installed versions?
1. There may be ways to get machine friendly output from these (or other) tools, which would allow for further, simple parsing on the command line. 2. I have submitted an edit so I can remove the downvote eventually.
Mar
9
comment How can I get recursively list an apt package's dependencies with their installed versions?
Because it seems like you didn't really read the question. I explicitly mentioned "recursive dependencies" and "currently installed version" in the first sentence of the question. I also linked to a similar question, explaining the extra requirement with mine. This doesn't add anything that's not already answered elsewhere on this site (including the linked question).
Mar
9
comment How can I get recursively list an apt package's dependencies with their installed versions?
Where are the version numbers for installed dependencies? How can I simply get each one, on a line, with this information?
Mar
9
comment How can I get recursively list an apt package's dependencies with their installed versions?
@FaheemMitha FYI apt-cache rdepends shows reverse dependencies (aka. dependants). Very confusingly, it has a similar name to apt-rdepends, which shows recursive dependencies.
Mar
9
comment How can I get recursively list an apt package's dependencies with their installed versions?
@FaheemMitha I want all packages that tcpdump depends upon, and all of their dependencies, and all of their dependencies, etc.
Dec
5
comment Why does combining `less` and `script` disrupt line endings?
Is there a way to replicate more "traditional" terminal/less interaction? I need to use script to get color output out of the executable I'm running, but the output is unreadable with the line endings the way they are.
Oct
12
comment Find recursively all archive files of diverse archive formats and search them for file name patterns
@Chemik - I just tried it, and it should support JAR files in its current form anyway. Can you test it out, and if it doesn't work as you expect, file a bug on the Github page? (I did just fix a bug, so be sure to update your copy.)
Oct
9
comment Find recursively all archive files of diverse archive formats and search them for file name patterns
@Chemik - noted! I'll do a bit more work on it this weekend :) JAR shouldn't be too hard, I believe it's really just a zip file to the outside world.
Apr
4
comment How can I activate the current session in ConsoleKit?
In fact, the easiest way to test this is to run ck-launch-session bash -c 'pkexec true'. If there's no output, it works. If you see (as I do) Error executing command as another user: Not authorized, it doesn't.
Apr
3
comment How can I activate the current session in ConsoleKit?
If I call ck-launch-session bash and run ck-list-sessions from within that terminal, the console still has active = FALSE for that session.
Mar
22
comment Is there a command to see where a disk is mounted?
"If the device was mounted via a different path in /dev that designates the same device, you won't notice it this way." — That is actually the case: I have the udisks symlink (in /dev/disk/by-label/...). But I can resolve to a device node using readlink -f. I like the /proc/mounts idea, I think that might be a bit more reliable than /etc/mtab.
Mar
22
comment Is there a command to see where a disk is mounted?
Although grep ^"${NODE}[[:space:]]\+" /etc/mtab | cut -d ' ' -f 2" is much less fragile...
Mar
22
comment Is there a command to see where a disk is mounted?
Ah, grep ${NODE} /etc/mtab | cut -d ' ' -f 2 should do it.
Mar
22
comment Is there a command to see where a disk is mounted?
That has a lot of extraneous text though. I need to be able to pass the mount point to other commands. (Sorry, I've clarified that in the Q.)
Feb
28
comment What characters do I need to escape when using sed in a sh script?
Are you subconsciously hitting your head against a wall? Here, have a green checkmark.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
Oh, this takes me back. I think this guide by Bruce Barnett has the RE used by sed. But what about the +? That's not in there, but echo 'AAA' | sed 's/A+/*/' won't work without escaping it.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
...and apparently + needs escaping too. That's... interesting.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
facepalm It's not in the man page, but it IS in some online manual I found. Is this normal for regex, because I've never had to use it in regex libraries (in, eg. Python)?
Feb
28
comment What characters do I need to escape when using sed in a sh script?
I want sed to see s/(127\.0\.1\.1)/..., but putting that in a shell script as-is doesn't work. What you're saying about the shell not touching the parentheses seems wrong. I've edited my question to elaborate.