Reputation
58,416
Next tag badge:
95/100 score
23/20 answers
Badges
11 83 161
Newest
 Yearling
Impact
~3.0m people reached

Jul
29
revised awk comparison using arrays
rolled back to a previous revision
Jul
29
comment awk comparison using arrays
@mikeserv doesn't seem to be, no. At least mount | grep tmpfs does not show /tmp. You think that's what makes it slower? Even theoretically though, why would reading all data twice ever be faster than reading it once?
Jul
29
revised awk comparison using arrays
added 35 characters in body
Jul
29
comment awk comparison using arrays
I just tested using a 287M file (the content of the OP's example repeated a few thousand times) and my awk approach took 23 seconds while the sort/uniq took 30. Here, both sort and uniq need to go over the entire file. Why would you expect it to be faster? Also, limiting the number of characters compared is clever but assumes that the number of characters per line is fixed, right? It will fail if one of the fields isn't empty or has a value with >1 digit.
Jul
29
comment Is there ever a good reason to run sudo su?
Thanks :) And I quite agree. I used to use su all the time until I switched to Debian-based systems and discovered sudo.
Jul
29
accepted Is there ever a good reason to run sudo su?
Jul
29
comment Is there ever a good reason to run sudo su?
@YoMismo the environments (as reported by env) of sudo -s (which runs $SHELL as root) and sudo bash are 100% identical.
Jul
29
revised awk comparison using arrays
edited tags
Jul
29
answered awk comparison using arrays
Jul
29
comment Is there ever a good reason to run sudo su?
Chaos, could you add a conclusion that takes a position about whether or not there's any point in running sudo su? The main point you seem to be making, apart from the comparison, is that no, there's no reason to run sudo su unless you are running a system whose sudo is more than 11 years old. Is that correct?
Jul
28
comment Bash : rewriting a file which is read in same line
Could you fix the quotes please? Show us the exact command in your script. What you show won't run so presumably, that's not what you're actually running. Please show us exactly what you are using.
Jul
28
comment copy from file and paste in the terminal without x server
Yes, sorry, I had missed that the program read input twice. I saw and deleted my comment.
Jul
28
answered copy from file and paste in the terminal without x server
Jul
28
revised copy from file and paste in the terminal without x server
added 8 characters in body
Jul
28
comment MInt 17.2, Enable Icon display for root desktop? Eg Home, Computer,etc
OK, please edit your question and include that detail and also tell us what desktop environment you're running. Note that some file managers don't even let you run them as root (as I recall, anyway). Finally, it might be a good idea to explain why you need this. If you've been using *nix for 15 years, you know it is very stupid to always log in as root and there is rarely any reason to do so from the GUI. Could you explain what your final objective is?
Jul
28
comment MInt 17.2, Enable Icon display for root desktop? Eg Home, Computer,etc
The file manager is probably not running. Open a terminal and run nautilus or caja or whichever file manager they're using these days. Does that make the icons appear?
Jul
28
answered How to copy and add prefix to file names in one step?
Jul
28
revised How to copy and add prefix to file names in one step?
deleted 5 characters in body; edited tags
Jul
28
revised Grep the text which matches with a pattern
Corrected output
Jul
28
comment pendrivelinux install on usb stick - only uses 5.8GB of a 14.7GB usb stick
Odd. In that case, please edit the command you ran and the error message into your question. As it stands, your question shows everything working as it should.