366 reputation
4
bio website
location
age
visits member for 7 months
seen 16 hours ago
stats profile views 8

Apr
19
comment sort ls output by users
Well it was a quick and dirty solution - so often what I do in linux when tackling a solution like this. I didn't think about the group - A break could be added to stop once the first matching field is found (which should be the user), and escaped the ls to avoid alias problems. Still not perfect, but meh, Works on My Machine©
Apr
19
revised sort ls output by users
Add a break to stop when found, escape ls to break aliases
Apr
18
answered sort ls output by users
Mar
20
comment How to view Silverlight videos without Moonlight from Linux?
It's my personal opinion that anybody using Silverlight on their websites should be shot. I'm looking at you, University website for online class lecture videos. I can play videos with Moonlight, but its wonky. Installed Windows 8, and found the videos worked fine, but the navigation page for finding videos would not (could only watch those in the recents panel). Terrible.
Mar
20
comment store command before pressing ctrl+c, revive afterwards
I have never used emacs for editing/coding, and have always used VIM, but VIM keys for the shell can be a major slowdown sometimes(VIM is much more suited for large expanses of text, not single lines). As such, I have been shown the Ctrl-K shortcut several times, and each time I have to smack my forehead. "Oh yeah! I forgot about that!"
Mar
20
comment store command before pressing ctrl+c, revive afterwards
I have always used echo as the command for this. This can cause issues if your weird characters interpreted by the shell, like * or !, so I often times go with the single quotes around it all as well.
Mar
11
comment Use of ./ in running the compiled code
Just because it doesn't seem that anyone has come out and said it directly - ./ doesn't mean run code. . is current directory, .. is parent directory. ./ is current directory, then slash for the directory separator. The program will only run if it is marked executable (chmod +x).
Feb
1
comment Compute average file size
As usual @StephaneChazelas your knowledge of linux/unix astounds me and shows me how dirty my quick and dirty solutions are. How long have you been using linux/unix?
Feb
1
revised Compute average file size
added 99 characters in body
Feb
1
answered Compute average file size
Feb
1
comment Compute average file size
As in the average size of each file in the directory? or the size of the directory?
Jan
22
comment How to prevent a mistaken rm -rf for specific folders?
added to my answer then
Jan
22
revised How to prevent a mistaken rm -rf for specific folders?
added 828 characters in body
Jan
22
comment How to prevent a mistaken rm -rf for specific folders?
You can change a file or directory to be immutable (chattr +i), and you can't rm -rf it even as root, but you also can't write to it or change it in anyway until you remove the immutable flag. I've used this in the past for various reasons.
Jan
22
answered How to prevent a mistaken rm -rf for specific folders?
Jan
14
comment removing the first and the last character of every line from command line
Guess that's what 40+ years of optimization of many of these *nix utilities will get you!
Jan
14
comment removing the first and the last character of every line from command line
I proposed this answer for people afraid of sed/awk/regex syntax, but wouldn't have imagined it's faster, especially for large files, with three pipes and passing the entire contents through each one. Would have thought sed or awk reading a line at a time would be more efficient for large files.
Jan
10
answered Optimal Setup for Windows & Linux - Sharing and Partitioning
Jan
10
answered removing the first and the last character of every line from command line
Jan
2
comment Fake serial number of USB device
Don't know for your particular phone, but in my experience once the udev rules are set (and you run adb start-server as root or using sudo), adb will be able to read the serial number on its own.