25,795 reputation
63175
bio website
location Athens, Greece
age 34
visits member for 2 years, 10 months
seen 7 hours ago

Elected moderator on Unix & Linux. Feel free to @ping me in chat if there's anything I can help you with.

I've been using Linux since the late '90s and have gone through a variety of distributions. At one time or another, I've been a user of Mandrake, SuSe, openSuSe, Fedora, RedHat, Ubuntu, Mint, Arch and for the past few years Linux Mint Debian Edition (which is basically Debian testing but more green).

My Linux expertise, if I can grace it with such a lofty title, is mostly on manipulating text and regular expressions since that represents a large chunk of my daily work.

profile for terdon on Stack Exchange, a network of free, community-driven Q&A sites


Dec
14
comment Listing content of directory with absolute path is not equal to listing with relative path?
@MichaelS ah, yes, a device mounted at / would also explain it. Thanks for the accept but since you've figured it out, you may as well accept your own answer and just upvote mine if it helped you. Accepting your own answer is perfectly fine.
Nov
24
comment Is there a way to 'clean out' physical memory (RAM) that is tied up on my Centos/Apache webserver?
Are you sure it's an issue? Is the machine actually running any slower?
Nov
20
comment How to make a symlinked folder appear as a normal folder
@zoechi this is perfectly on topic on both sites. As a general rule, I would post more technical questions like this on U&L and more user-space questions here. The choice is completely up to you though. On the one hand, there are more users here so more eyeballs, on the other, there is a much higher concentration of professional *nix people on U&L. Just make sure you don't post the same question on both sites. If you want to move it, either delete this or flag for mod attention and ask them to migrate.
Nov
20
comment How to hide the network shared directories C$ D$ ADMIN$ by windows in linux client?
Please edit your question and explain how the Windows machines are set up to share. Why not simply deactivate those shares from the Windows side?
Nov
19
comment BASH history truncated to 500 lines on each login
@NoahSpurrier BASH_ENV is not relevant, it only affects non-interactive shells. As for the "idiom", it is something that Debian started and with which I personally don't agree. I often have graphical options (xset and the like) in my .bashrc and I don't want those active when I run login shells either from a tty or through ssh. I want my .profile and .bashrc separate. Many (though not all) login managers source .profile when you log in so global variables are best set there where they will only be read once and not each time you open a terminal.
Nov
19
comment Is there a way to display a countdown or stopwatch timer in a terminal?
@orip fair enough, done.
Nov
13
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
@EugeneBeresovksy your edit was rejected before I had the chance to review it so I did it myself.
Nov
13
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
Ah, true. OK, I posted a new version that i) uses sort -m ii) doesn't eat blank lines and iii) doesn't add extra ones. And then it will turn out that something like logrotate can do all this automatically :)
Nov
12
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
Ah, to get rid of the blank line, just pass it through grep .: perl -ne 's/\n/\0/; s/^/\n/ if /\d+:\d+:\d+\.\d+/ ; print' log* | tr -s '\0' '\n' | grep . Or even awk 'NR>1'.
Nov
12
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
Nice, +1. Though I have to say that awk seems needlessly complex. Why not use the much shorter perl version in your alias?
Nov
11
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
@EugeneBeresovksy I still don't understand how you could merge without either storing the data in memory or in a temporary file (which is what sort does). Perhaps there is a way but, if so, I don't know it. You will need to be able to insert one file into the middle of an another so some kind of data structure will be needed. Anyway, have a look at the updated answer, I've posted a new approach that only ever keeps a single line in memory.
Nov
10
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
@EugeneBeresovksy yes, as I said, it is possible using temporary files (that's what sort does). I see what you're describing but implementing a full sort algorithm is way beyond the scope of this site.
Nov
9
comment Nas/Switch/ DD-WRT Router, Interesting Problem
This is not really about *nix but about networking in general. I am moving it to Super User.
Oct
22
comment how to shut down a server from the webinterface
@wenzul see the update, if you really want to do this via a web server, use one of the existing ones. Webmin will be much more secure and has all sorts of cool features.
Oct
20
comment Shell script bash: Moving file iterate based on month
@unegma no, I should have quoted in the first place. Thanks for pointing out, answer edited.
Oct
16
comment Emacs opens “Messages” pane on startup
@Dave strange, no idea why. By the way, I had assumed the OP didn't want the messages buffer in general. I had not understood that there was a syntax error in the init file causing it to appear in the foreground and not just loaded along with *scratch* in the background. That's why I said this always appears.
Oct
14
comment Emacs opens “Messages” pane on startup
@Drew I'm on Linux and I have always had the messages buffer open. On many different machines, distributions and emacs versions. I very much doubt this is a bug.
Oct
14
comment Emacs opens “Messages” pane on startup
@Drew not sure about that. I get the messages buffer open irrespective of whether there is a problem. With emacs -Q for example. This hack will just hide it.
Oct
9
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
@EugeneBeresovksy I don't see how. The files are not sorted, that's the whole problem. They're only sorted within each file, however, you can find line1 and line3 in fileA while line2 is in fileB. I don't see how you can sort that without either using temp files or storing in memory. If you would rather have tmp files, let me know and I'll give you an example.
Oct
8
comment Merge by date multiple log files that also include un-dated lines (e.g. stack traces)
Is this an actual UNIX or do you mean Linux? Do you have the GNU tools?