Reputation
647
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 21
Newest
 Enthusiast
Impact
~26k people reached

May
9
comment How can I find and replace with a new line?
@Iain GNU sed and sed (some of which are strictly POSIX-compliant) need not necessarily be the same...And I am pretty sure the functionality you tested is guaranteed on GNU sed only. With the others, it may - or may not - work. Like playing poker. :-)
May
1
comment KDE opens .deb files with ar instead of a package manager
@derobert Thank you for speaking up and for pointing that out in full detail.
May
1
comment KDE opens .deb files with ar instead of a package manager
@VillaCaleb Well, you would actually have done dpkg -i at the same place where you did the aptitude call, and that is at the terminal prompt in bash. Please note that this is only necessary once apt-get fails. As in your case it did not fail, you may just disregard that.---Besides, thanks for accepting my answer; frankly, I would not even have dreamt about it, as I got some criticism for it ("off base" and things) ;) But: who laughs last laughs best (proverb). :P
May
1
comment KDE opens .deb files with ar instead of a package manager
@Celada Listen, I am seriously willing to delete my answer IF I have a proof that it is off base. But the OP has got to return first to know exactly...You're merely assuming that Jordan's answer is spot-on, but you can't know for sure either unless we get some feedback from that dude...
Apr
28
comment Duplicate sources.list entry
@Raymond_W Agree to Jason. Without your sources.list file, nobody of us can help - period. So please remember to supply it if you still want help about this issue.
Apr
28
comment How do I deal with directories that have spaces in their names from `find`?
Just to make one thing clear: for the OP's question, the for loop is indeed unnecessary BUT ... it is not necessarily redundant, especially not for bash beginners. For example, if you use two loop variables i and j (with j being an altered i) or simply a couple different statements, the for loop approach (though frowned upon) is easier to comprehend than teaching them the pro solution of -exec sh -c ... which is as if you attempted to teach calculus to a person that only ever learned about basic arithmetics.
Apr
26
comment Why can't I remove the empty directory with username www-data?
What does ls -al (instead of ls -l) show you? It is possible that there's still one or more hidden files OR folders inside /home/test (starting with a dot (.)) which need(s) root permissions to be deleted and which might inhibit the recursive deletion of the entire folder.
Apr
26
comment Find what process implements a FUSE filesystem
"Generic answer that works on all systems with FUSE support" has just been proved impossible. :) Because you cannot assume that the driver name shown in /proc/mounts has to be identical to the one you specify to pidof. My NTFS partitions have just (unfortunately) shown the naked truth: the driver shows up as fuseblk in /proc/mounts, whilst you have to use pidof with /sbin/mount.ntfs (i.e. /bin/ntfs-3g) to get the pids you want. This is far from unified, methinks, and too far to even think of parsing /proc/mounts for driver names one might want to feed into pidof.
Apr
17
comment Store 2^500 in a variable in bash
@StardustOne Not really. You can use arbitrary groups of characters with the two parameters, e. g. try echo "havk vf sha" | tr 'fhaskv' 'sunfxi' :) (this is rot13 for the poor man, with the chars deliberately unsorted to not give away the solution too soon :))
Apr
17
comment Store 2^500 in a variable in bash
@jimmij One thing; going the echo way is much more portable (think commercial *nixes). Plus, you must ensure that your /tmp is writable if you use here strings. Think of emergency consoles with / mounted ro - your here string approach will FAIL.
Apr
17
comment bash: -eq vs. == and `bc` output type
Can we agree that the manual is a bit too less clear and verbose on this matter still? ;)
Apr
17
comment bash: -eq vs. == and `bc` output type
Well, thanks for the explanation, but in fact I didn't "confuse" anything. I simply was unsure, hence I chose to ask. Plus, I wasn't able to determine the bc output type. Whatever, in the bash manual page, there was nothing written explicitly about the == being used for numbers - only for strings.
Apr
17
comment bash: -eq vs. == and `bc` output type
Just never thought of that, thanks for the inspiration. :) I'm a bash old-schooler and still not too familiar with the "modern" ${...#...} syntax using brace substitution.
Mar
23
comment Setting correct permissions automatically for certain file type when file is copied from non-Linux file system
All in all this is a nice approach, thank you. I think I can inject some more tricks into my script later myself, e. g. checking out the FROM file system whether it is NTFS, e. g. result=$(lsblk -no FSTYPE) and then test the $result value whether it reads "ntfs". Caveat: Some big HDDs might consist of partitions with both ext and NTFS file systems on them, so make sure your arguments for lsblk are partitions, not devices.
Mar
23
comment Setting correct permissions automatically for certain file type when file is copied from non-Linux file system
"since this type of behavior would make a lot of people happy" - You can say that again. It's no real fun always having to remove silly permission flags that do not belong there for audio files (e. g. executable in a standalone way).
Mar
23
comment Setting correct permissions automatically for certain file type when file is copied from non-Linux file system
This is fantastic! First time I've heard of this handy little program. Thank you so much, your answer is about to get my "accepted answer" vote, unless...wait and see.
Mar
23
comment dircolors: rules for _ext (rather than .ext)
No, there are no undocumented features. BUT someone has already tried hard to work on this issue, see lists.gnu.org/archive/html/bug-coreutils/2012-10/msg00057.html . Unfortunately the author of the patch decided to discard the patch shortly after for various reasons.
Mar
23
comment How to get the Adaptec 1200A to work under Linux at UDMA/100 (instead of 66)
Wait a moment...this could be the cause of the problem!! Telling from my log files, there is no driver used for this card, but the kernel uses its generic driver for initializing that card instead! I'll now have to find a way how to load the correct HPT370 chipset driver by trying to modprobe the pata_hpt37x kernel module, "telling" the kernel not to access the card using its generic methods. However, modules with the pata_ prefix are known to be experimental, hence there is a chance I will have to allow the use of these experimental modules...Whee, tricky stuff.
Mar
23
comment How to get the Adaptec 1200A to work under Linux at UDMA/100 (instead of 66)
Frankly? I doubt it! This is all you will ever get from the dmesg log: ata5: PATA max UDMA/66 cmd 0x(hexaddr) ctl 0x(hexaddr) bmdma 0x( hexaddr) irq xx. -- That one lone line really won't help much, otherwise I would have been more specific.
Mar
22
comment Intentional kernel panic under Linux?
@MichaelMrozek Oh, inducing this by force can be a great technique for people who use the kernel in embedded applications. Think of copy-protection mechanisms, respectively people using counterfeit / illegally modified hardware. The whole thinking behind to me seems very 80s, though: it reminds me of CBM Amiga times when they caused the "Guru" to blink if some copy protection was bypassed in erroneous (i. e. amateurish) ways ;)