Reputation
5,855
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 13 27
Newest
 Yearling
Impact
~398k people reached

3h
revised How to remove all comments from a file preserving escaped hash chars
fix markdown backslashes
3h
comment How to remove all comments from a file preserving escaped hash chars
@StéphaneChazelas I actually had considered including an example of that sort of quote-mixing, but I didn't want to go into too long a discussion of shell quoting techniques, especially since this isn't code golf. As for the backslash, I wasn't sure since can put \] and \- in a character class.
6h
revised How to remove all comments from a file preserving escaped hash chars
added 366 characters in body
6h
answered How to remove all comments from a file preserving escaped hash chars
9h
revised Can I detect if ssh agent forwarding will succeed before attempting?
added 2 characters in body
9h
revised Can I detect if ssh agent forwarding will succeed before attempting?
added 401 characters in body
9h
answered Can I detect if ssh agent forwarding will succeed before attempting?
10h
comment Can I detect if ssh agent forwarding will succeed before attempting?
Er... What you're really asking is for it to not prompt for a password. This doesn't necessarily have anything to do with agent forwarding.
May
2
comment Real time cmd tool to show HDD space remaining
@oshirowanen You can use watch, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.
Apr
27
comment Scalability of 'sort -u' for gigantic files
@StéphaneChazelas If I were designing a tool specifically for sorting very large files, I would store the lines as an index into the original file. Does GNU sort do this, or does it simply use a conventional compression algorithm?
Apr
18
comment How do I securely extract an untrusted tar file?
@cat The default archive format is a reasonably widely supported tar variant (AIUI it's also supposed to support cpio format). Pax is rather an attempt to replace the command interface for dealing with such archives, since tar's command argument handling is... quirky.
Apr
11
comment What is this dd if=/dev/zero of=/dev/sda do
@BenVoigt Because they were shown in a context that demonstrates that they're intended as part of a "wipe disk for clean re-use" process, but not in sufficient detail to satisfy OP's curiosity as to how it works and what specific role the specific command has in that process.
Apr
4
awarded  Yearling
Mar
28
answered GNU Emacs Gnus can't connect to gmail IMAP
Mar
17
answered How to get the tty in which bash is running?
Mar
13
comment How to create a large file in UNIX?
The proper non-dd way of doing this specific task would be head -c 1048576 /dev/zero > file
Mar
13
comment How to create a large file in UNIX?
@terdon the reason people use dd for disk images is because they've seen it used in tutorials and such and assume there's some reason behind it. The original reason for using it was a bug in an early version of GNU cp (which could otherwise be used) that caused it to screw up in writing all-zero blocks. I've written about this: unix.stackexchange.com/a/189091/6290
Feb
26
comment On Unix systems, why do we have to explicitly `open()` and `close()` files to be able to `read()` or `write()` them?
Also where in the file to read/write it - the beginning, the end, or an arbitrary position (to typically be immediately after the end of the last read/write) - the kernel keeps track of this for you (with a mode to direct all writes to the end of the file, or otherwise files are opened with the position at the beginning and advanced with each read/write and can be moved with lseek)
Feb
9
comment Is a directory removed when its number of hard links becomes 0?
@edwardtorvalds No, I was referring to the removal of the ".." link itself, not the parent directory it points at.
Feb
3
comment How is Mono magical?
Eh, I was thinking more in terms of REST-ish philosophy than use by humans.