Reputation
1,517
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 16
Newest
 Yearling
Impact
~57k people reached

  • 0 posts edited
  • 0 helpful flags
  • 20 votes cast
Jan
31
comment Sudoers for one day per week?
@SamWatkins - sometimes the right answer to a question is "You can't do what you want even if you can do something that looks like it does".
Dec
24
comment Mounted dir disappears after restart
@DonSimon Man pages are great if you know what you're looking for, but they aren't great how-to guide for neophyte users. I already know an answer to his question, but it's not at all obvious from mount's man page that it is the right answer, this is far from clear: The file /etc/fstab (see fstab(5)), may contain lines describing what devices are usually mounted where, using which options. Even the fstab man page doesn't make it clear that it describes filesystems mounted upon boot. For a cdrom drive he might also be better served by some sort of automounter.
Dec
7
comment How do I pipe ls to grep, and delete the files filtered by grep?
No need to pipe to xargs if you use -exec option: find . -name '*chrome*' -exec rm -i {} +
Nov
17
comment Host name changed remotely by wifi?
If he translated the city name to TU Vienna, then it would be a lot less clear why he got a tuwien.ac.at domain name for those that don't know the translation. I don't see how such a translation would add anything useful to the question.
Aug
20
comment How to safely turn off swap permanently? (on Debian Jessie)
@SnakeDoc - you won't typically get a kernel panic, the OOM handler will kick in and kill process(es) to free up memory (and it usually does a pretty good job deciding which one(s) to kill, generally giving preference to killing larger and newer processes). I maintain a large number of servers without swap that are set to panic on OOM instead of killing processes because the servers are configured such that they will normally never run out of memory and if they do, I want them to panic and reboot rather than swap and slow down (or let the OOM handler decide what processes to kill)
Jul
27
comment What does the `-C` flag exactly do in `scp`?
@Score_Under - The zip format is also used by Java to package .jar files, so zip is still used extensively on many Linux servers.
Apr
21
comment Download a file to a server?
The semicoon can mean anything the receiving side wants it to mean, but in this case, it does look like it's a parameter separator.
Apr
21
comment Download a file to a server?
@hildred Good suggestion, I changed the answer to use single quotes.
Apr
8
comment How to 'drop'/delete characters from in front of a string?
For just a few characters, I'd use ... instead of .\{3\} since (to me) it's easier to read: sed -e 's/^...//' -e 's/....$//' or in a single expression with alternation: sed -r 's/^...|....$//g'. If it were more than a few characters to delete, then I'd use the /.\{17}\/ expression instead of /.............../.
Mar
12
comment monitor linux file systems using df
I believe that for some older kernels unless the filesystem is mounted with the "intr" flag, then all NFS operations are uninterruptible. I'm not sure what "timeout" does in this case, but I suspect that it abandons the "df" command so you may end up with a bunch of zombie df's in the background.
Mar
2
comment How do I grep recursively through .gz files?
That's only looking at a single file, it's not recursive.
Feb
14
comment Cloning a drive larger than your own
How about using operating system utilities (resize2fs on linux) to resize the partition, then use p2v to virtualize it?
Feb
14
comment Cloning a drive larger than your own
That doesn't really address his problem since 2TB is larger than his entire filesystem... and if he's unhappy about taking 6+ hours to clone, he's not going to be happy at the overhead of bzip2. I'd use "gzip --fast".
Jan
30
comment Wildcards: how do I list files ending in `.txt` only without using the dot character?
@don_crissti - Even knowing that his problem set is limited to the given set of files would be useful, but few real-world problems are so well defined that the entire input space is known and can be enumerated in a few items. Questions here are supposed to be based on real problems, not open-ended questions that could spawn dozens of answers. There are 4 answers below that work with the file set above, but without further information, it's not clear if any of them meet his needs.
Jan
30
comment Wildcards: how do I list files ending in `.txt` only without using the dot character?
@don_crissti - I think the unclear part is why he doesn't want to use the period in *.txt, which is the obvious way to get the list of files he's looking for -- if he can state what problem he's trying to solve, then maybe someone can give him the answer. There are lots of ways to list only the files ending in .txt without using a '.' in the glob match, but some may not meet his needs in other ways.
Jan
29
comment Any disk encryption that locks itself for some time after a number of failed attempts?
@AaronLS - The xkcd comic assumes 11 bits of entropy per word, which is equivalent to a 2048 word vocabulary. The average 5 year old has an expressive vocabulary of 2150 words (by high school it's around 10,000 - 17,000 words), so as long as you have the vocabulary of at least a 5 year old, and don't just pull the passphrase from a few common words, the XKCD model holds true. The most important thing is to pick random words, not well known phrases.
Jan
29
comment Any disk encryption that locks itself for some time after a number of failed attempts?
Of course, a determined hacker can divide your iter-time by the number of computer's he's willing to expend on hacking you - if you have iter-time set to 60000, and he has 1000 computers to spend on hacking you, that's the same as if you set iter-time to 60, so don't assume you can use a 4 character alphanumeric password in the belief it would take him years to crack it.
Jan
28
comment Can signal be ignored (lost)?
Did you mean to write "A signal is guaranteed to be delivered" since you went on to describe some of the ways in which the signal would not be delivered (i.e. process died before it was received, or signals were coalesced)?
Jan
20
comment How to represent date format in '2015120' in Linux shell?
out of curiousity, does he zero pad days? Is Feb 1st written as 201521 or 2015201?
Jan
13
comment Is it good to have multiple version of Linux Kernel?
The other option is to have enough server redundancy that you don't care what happens to any particular server, if it fails to boot after an update, you just deploy a new server and add it back to the server pool. Harder to do if your clients are logged in locally, but generally easy to do if it's providing some service to users and it takes a lot of the stress out of system updates.