Reputation
710
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 24
Impact
~32k people reached

2d
revised Getting logged out of user account upon execution of a program
added 364 characters in body
2d
answered Getting logged out of user account upon execution of a program
Aug
28
comment Deal with renamed videos in youtube-dl
Thanks for the info and the link. Well, in case that data is always added at the same (relative) offset (e. g. 1024 bytes before the end of the video, or even at invariable starting and ending offsets), even this would be possible to handle. But I'd have to do a more thorough test to be sure. :)
Aug
28
comment Deal with renamed videos in youtube-dl
Ah, OK. So this'd work, even though it seemed against your original intention, hence I chose not to mention it. :) Anyways, it's true: from user's (or client's side), the only way you can do is live with the duplicate already downloaded (as you can't prevent it from happening, as I explained above) and afterwards doing your deletion operations on it if need be.
Aug
28
comment Deal with renamed videos in youtube-dl
I'd say you can't. You must find a way to tell youtube-dl to skip downloading when files are equal byte-wise. And this can only be done in code (i. e. by expanding it (-->feature request??)), because the current version of the script will already have downloaded the video when you will be returned to your bash prompt again - no matter if already there or not.--- In comparison, think of an observer/intercepting mechanism in web servers that can hook in before any JavaScript is ever loaded. The same thing you need to do here before youtube-dl attempts to download from YT.
Aug
28
comment Deal with renamed videos in youtube-dl
I don't have a solution, but a hint: what about md5ing (or, if you insist, applying the good ol' crc32 on) the video file and doing a byte-wise file comparison? This would, however, have to be programmed into youtube-dl because once it has finished doing its work, there is no "post-operation" you can do on it. (Because you want to prevent the tool from downloading in the first place if the video already exists!)
Aug
13
comment Is there a difference between ./script and bash script?
In a nutshell: IMO using bash itself (instead of its built-in commands) for running a script I'd almost compare to "committing a crime."
Aug
13
comment Is there a difference between ./script and bash script?
Wait a moment...I have never written anything about the . command. That's yet another pair of shoes. I only mentioned ./script and source script in my answer, but not . ./script. Yes it can be confusing at times. Ah, and big thanks for the downvote. :P Yay, that felt so refreshing.
Aug
13
comment Is there a difference between ./script and bash script?
@Slothworks FWIW, source tryit.sh won't care about the status of the +x bit either :) In any case, I think the source way is much better than using the fairly huge bash binary itself to run a script which lacks the +x flag. I've never had a situation when I had to (mis)use bash as a trigger to run such non-executable script.
Aug
13
revised Is there a difference between ./script and bash script?
added 433 characters in body
Aug
13
revised Is there a difference between ./script and bash script?
grammar from->for
Aug
13
awarded  Popular Question
Aug
13
comment How to (really) disable NCQ in Linux
@Paebbels Oops, I should not have overlooked the FPGA bit. Well, this is indeed something completely different to our common HDDs connected to buses of mainboards of desktop PCs or notebooks ;-) "In such an environment it's far to complex to write hardware routines that perfectly handle MBRs and file system acesses". True. You won't be able to do without a HDL. And I can imagine that programming such thing is not for the faint of heart...even though the Wikipedia code example suggests that it's an utter walk in the park ;-)
Aug
12
comment Custom Kernel to Disable SATA and USB Devices
"You could completely disable USB too if you want" Yes...BUT...in this case I would recommend using one of the good ol' PS/2 mice. Because, to connect a mouse the modern way, you DO need an USB port. And supposing that, once logged on, some folks can get around quite well w/o mouse, they might simply connect another USB device to that "mouse" port. That's why it's called Universal Serial Bus: you can connect either hardware to this bus. There are no USB ports which are "only for mice" ;-)
Aug
12
comment How to (really) disable NCQ in Linux
> dd if=/dev/zero of=/dev/sdb bs=32M count=32 Dunno what you intended to do with that; but it will erase both the MBR and gazillions of blocks beyond. Doing this on a drive with the main system running on it (and grub installed on MBR, as in my case) would be fairly dangerous ;) Thought I'd write this here as a comment, to prevent some less-experienced folks from experimenting with your "cool" line...;)
Aug
12
revised How to get the Adaptec 1200A to work under Linux at UDMA/100 (instead of 66)
added 301 characters in body
Aug
12
comment How to get the Adaptec 1200A to work under Linux at UDMA/100 (instead of 66)
@StephenKitt Sorry for the long delay, had no time for experiments, hence I had to remove the card in the meantime.-- Though I doubt the init msgs you requested will tell much, here they are: pata_hpt37x: HPT370 using 33MHz bus clock | scsi host10: pata_hpt37x | scsi host11: pata_hpt37x
Aug
10
comment How do I remove persistent config data from APT?
Looks that aptitude is not (or no longer?) installed by default on some Ubuntu flavors. sudo apt-get purge <packagename> worked for me as well. I must say that the tool name apt-get is totally misleading, as it is NOT only meant to get/fetch files, but can do lots of other things. apt-tool would have been more appropriate and, above all, represent its scope much better. Oh, want to purge everything? Try this: sudo apt-get purge $(dpkg -l |grep '^rc' | awk '{print $2}' | tr '\n' ' ')
Aug
9
revised Need shell script to transform a CSV into Apache httpd format
"grock" is not English. Possibly "grok" was meant; however, this means "comprehend", "understand" and is totally illogical in this context.
Aug
9
comment uniq a csv file ignoring a column, awk maybe?
Nice and elegant solution! (the perl one) However, as a total Perl rookie, it required me a little RTFM to understand what you were doing here. %lines (easily recognizable by its percent sign) is an associative array (aka "hash variable" in Perl lingo), which may accept "real" strings as key identifiers, not just index numbers. This is the element responsible for all that miraculous "magic" done here.