Reputation
3,046
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
9 19
Newest
 Nice Answer
Impact
~337k people reached

  • 0 posts edited
  • 0 helpful flags
  • 75 votes cast
1d
comment What does the second column of ls -l mean?
@Stéphane, that's what I recalled.. but I just checked on OS X and all files raise the directory's link count. Must be OS X weirdness, I hadn't realized.
1d
answered How to get numbers of specified (range of) length from string with grep?
1d
comment What does the second column of ls -l mean?
Welcome to stackoverflow. When you add a file inside a directory, the link count for the directory goes up by one. (Column 2 is indeed the link count.) Are you sure this didn't happen in your test?
Apr
23
answered How do I modify a file without updating the modification time?
Apr
23
comment How do I modify a file without updating the modification time?
Thanks! The linked question is tagged [vim], but the solutions are indeed editor-independent. IMHO the question hasn't been fully answered, though (touch -r is clever, but using a temporary file is clunky...)
Apr
23
asked How do I modify a file without updating the modification time?
Apr
21
revised Why would I tar a single file?
mention that gzip also records the original filename
Apr
21
comment Why would I tar a single file?
Thanks for pointing this out, I hadn't known that. Still, since that's not the default behavior, the point stands: Distributing a file in tar format preserves the original filename (and possibly the relative path), without intervention of the recipient. Distributing a (g)zipped file doesn't.
Apr
21
awarded  Nice Answer
Apr
20
revised Why would I tar a single file?
edited body
Apr
20
answered Why would I tar a single file?
Mar
12
comment getting the owner of the folder with the if command
And I agree with your statement. But the use case here is to protect "critical system files" by checking if the target folder belongs to the user. Clearly, if you're only supposed to remove your own resources, you should not be running with superuser rights. In your own folder, you don't need setuid privileges to remove someone else's files. Subdirectories are harder, but that's best handled in advance by setting the folder permissions properly. (Again, I would have given specifics but it's not clear what the OP is up to.)
Mar
11
answered getting the owner of the folder with the if command
Mar
8
comment Why is the password I entered not visible?
Addendum: Terminals that "do extra work" to echo user input are so-called "full duplex" terminals. In Ye Olde Days there were also "half duplex" terminals, where the character was displayed right away by the terminal upon being typed, and the OS did not send it back to the terminal for display. If I remember correctly, these terminals had no way to turn off echo.
Mar
4
awarded  Good Question
Mar
4
awarded  Popular Question
Mar
4
revised Syntax highlighting in the terminal
added 11 characters in body
Mar
3
awarded  Nice Question
Mar
3
comment Syntax highlighting in the terminal
That's encyclopedic, thanks! I settled on pygmentize since I already have pygments installed.
Mar
3
accepted Syntax highlighting in the terminal