Reputation
586
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
2 7
Newest
 Nice Answer
Impact
~10k people reached

  • 0 posts edited
  • 0 helpful flags
  • 42 votes cast
Jan
28
awarded  Nice Answer
Jan
27
answered How do I remove all lines in a file that are less than 6 characters?
Jan
27
comment How to turn current job in background?
@ChristopheDeTroyer: I'd would rephrase your answer (even though you already precise the correction) : "You first suspend the foreground job by pressing C-z, [at that point, the process is suspended and doesn't do anything other than wait], and then you allow it to continue running in the background by typing bg. jobs will show you the backgrounded jobs. To bring one in the foreground again (for example, to then be able to stop it), you type: fg %n, n being the job's number (not its pid!). "
Dec
18
comment What does each part of the `ls -la` output mean?
field5 = the number of hard links to this file. symlinks to a file don't add 1 to this file's 5th field. Try : touch foo bar and then ls -l foo bar (both will have 1 inode pointing them). then ln foo baz ; ls -l foo bar baz will show both foo and baz, 2 entries pointing to the same inode (pointing to the content of foo), both have "2" as their hard link number. Then add a symlink: ln -s foo toto and still only foo & baz have 2 inodes pointing the same file, toto has 1. In the end, foo & baz will have 2, and bar & toto will have 1 in their 5th field, as both have no hardlinks to them
Dec
7
comment System without /tmp dir?
@thomasrutter: about the 5% limit: it is true for process run under other users than root, but process run as root are still able to fill up the remaining 5% ^^ [they shouldn't, of course... but Stuff Happens]
Dec
7
comment System without /tmp dir?
having /tmp a separate filesystem has a BIG advantage: you won't fill up the entire root filesystem if you fill up /tmp. But it has a drawback: /tmp may end up being too small, sometimes (and the space underused most of the time). Therefore it happens that it is not in a separated filesystem (and therefore in the root (/) filesystem) if you can live with (or prevent) the potential problem of filling / . Monitoring most filesystems fill % is a good idea (ex: have warnings when one fills >=80% of space or inodes). Having either "/" or "/tmp" fill up is often bad, with lots of weird consequences
Oct
1
awarded  Yearling
Sep
24
revised Disk slowly filling up but no visible file size changes
added 70 characters in body
Sep
24
revised Disk slowly filling up but no visible file size changes
added 2nd paragraph showing why it's relevant (and overlooked in the top answer)
Sep
24
revised Disk slowly filling up but no visible file size changes
corrected link and (in previous edit) added final chapter
Sep
24
answered Disk slowly filling up but no visible file size changes
Jun
24
comment How do I round numbers to the nearest integer from the command line?
The answers provided are good (and better than what I'm just about to mention), but just for the fun of mentionning it: a possibility is to add "0.5" to each number and keep just the integer part (for ex: drop the decimal part). There are many ways to do that one (and many caveats, especially when you reach the maximum value, which in turns depends on the program and its implementation)
Feb
20
comment How to find lines matching a pattern and delete them?
@terdon : it s all for the better good ^^ (and I did +1 already, though, as it's very informative for beginners)
Feb
20
comment How to find lines matching a pattern and delete them?
the bash one should use printf "%s\n" "$line" : quoting $line to preserve whitespaces, and avoiding some echo problems (interpreting special chars, etc). and avoids the need to add -- too.
Dec
9
comment What is the difference between “>” and “>>”?
In addition to the nice answer below, please see the 2nd (and most upvoted) answer on stackoverflow.com/a/984761/1841533 : using >> to write to a file (ex: a log) also has the nice side effect to not have "Nul" chars appear at the beginning of saif file if the file is truncated while the process still write to it! (ex: during log file rotation). Because "foo > file" doesn't seek, it doesn't notice the size change and still points further than the beginning, ad the OS fills with Nul. foo >>file seeks and therefore points to the new position (the beginning).
Dec
9
comment What is the difference between “>” and “>>”?
found what I meant: In addition to this nice answer, please see the 2nd (and most upvoted) answer on stackoverflow.com/a/984761/1841533 : using >> to write to a file (ex: a log) also has the nice side effect to not have "Nul" chars appear at the beginning of saif file if the file is truncated while the process still write to it! (ex: during log file rotation). Because "foo > file" doesn't seek, it doesn't notice the size change and still points further than the beginning, ad the OS fills with Nul. foo >>file seeks and therefore points to the new position (the beginning).
Oct
20
comment What is use of command: `command`?
+1 for a great pedagocical way to answer. However, I'd suggest to say that command something bypasses both function AND alias named something, whereas \something would just bypass the alias something but would execute the function. To my knowledge, there is no way to just bypass a function without bypassing also an alias named the same way. (Your answer says "it bypass the function (...) and go straignt to either builtins or your path" but doesn't mention explicitely it bypasses also aliases, which the OP (or maybe another person) may still need to see explictely written to "grok" it)
Sep
17
comment How can I run original command that aliased with same name?
additional precisions in bash : command something bypasses both alias AND function named something. \\something, 'something' and "something" only bypasses alias named something (if a function exist, it will then be called). (alias precede function if both exist and none are bypassed)
Sep
5
comment Remove the first part of a string using sed
+1. didn't see your answer, I'll remove my comment on OP's ^^
Aug
27
comment What are the advantages and disadvantages of mounting various directories on separate partitions?
+1, this answer covers a lot of good points! (this answer should be on top)