520 reputation
26
bio website
location Chicago, IL
age 26
visits member for 2 years, 11 months
seen 2 days ago

Oct
10
comment Use gzip to compress a directory except for already existing .gz files in the directory
@DennisWilliamson My last comment wasn't clear, it's also going to exclude files with gz anywhere in the name (except the start). So it's better to anchor it anyway. Having not used $, it read as though you didn't realize what . means in a regex, hence the rest of the confusing comment.
Oct
10
comment Use gzip to compress a directory except for already existing .gz files in the directory
"...that makes it less likely to match some internal part of a filename" - it's grep, just use $ so it's clearer. And you didn't escape the . anyway, so it's only going to exclude files that start with gz (since they don't have "any character before gz")
Sep
20
comment Terminology reconciliation: Display manager vs. session manager, Windowing system vs. Window manager
Clarification: Your "Correct." in the last paragraph is referring to the second question in the quote it's under, not the first, right?
Sep
5
comment Remove all files/directories except for one file
I'd suggest -delete instead of -exec, shorter and easier to remember
Sep
2
comment How to find a position of a character using grep?
Now search for 2 ;)
Sep
1
comment Autocomplete of filename in directory
It is weirdly difficult to find the name of the complete command if you don't already know it and are searching for autocomplete or tab-completion... This was the first place I found the command name, and what I needed to fix it for eject on upgrade to Ubuntu 14.04 ($ complete -p ls -> complete -F _longopt ls, so the fix was: complete -F _longopt eject) (Here's hoping this comment helps others find it!)
Jul
16
comment Why do I have to escape a “dot” twice?
I strongly prefer @LeonidBeschastny's suggestion because of how much clearer it is what's going on
May
13
comment Why *not* parse `ls`?
I should note that in various comments, mikeserv's primary reason for parsing ls was that he can do some additional preprocessing (like sorting or filtering with grep) before the traversal. This alternative does not currently do that.
May
12
comment Why doesn't grep using pipe work here?
Additional note on combining them: If for some bizarre reason the file exists at /foo/bar/denied/libGL.so.1, combining stdout and stderr then filtering would hide the result
May
5
comment Threads vs (Forked) Processes
@0xC0000022L You missed the important part of V13's answer: "You fork the execution path" - the question is about how threads are spawned, not what the difference between threads and processes are
Apr
13
comment How to randomize the output from seq?
I use xargs instead of paste for that ;)
Apr
10
comment Why isn't there any shell command to create files?
@lanzz And now we also have vim - (vim read from stdin) which AFAIK does even more than less ;)
Mar
30
comment /etc/environment not working
Do users on this site generally not VTC as Duplicate? 'Cause aside from python being removed, symptoms are identical.
Mar
30
comment /etc/environment not working
I have the same problem as the OP. ~/.profile is including the user's private bin/, ~/.bash_profile and ~/.bash_login don't exist (I don't think they ever did), and /etc/environment is correct (and with the correct permissions according to another answer). The PATH from /etc/environment still isn't being loaded, except it is being loaded for a newly-created user. Ubuntu 12.04 - any further ideas? (In the meantime, I'm just sourcing it in ~/.bashrc, although I would like to know what broke)
Mar
21
comment How to shutdown Linux at a specific datetime from terminal?
@Ramesh You can't delete your answer if it's been accepted. Mods can, but they're very unlikely to.
Mar
20
comment How to comment multiple lines at once?
Or even use / to jump to the endpoint, or % if the endpoint is a matching } (or { if jumping backwards). I like the visual modes so much more than specifying ranges...
Mar
19
comment Why are there so many different ways to measure disk usage?
I remember seeing a card catalog when I was like 6. I wonder how many won't know what they are?
Mar
2
comment Make disk/disk copy slower
@antonone But Unix.SE is not ArchLinux's forums. Someone here might have a solution.
Feb
19
comment Delete files and directories by their names. No such file or directory
-delete also handles things like spaces better
Jan
28
comment How to redirect the output of any command?
Be careful with the redirection operators, their order matters a lot., but you didn't include an example of actually using 2>&1