Reputation
520
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
2 6
Newest
 Yearling
Impact
~60k people reached

  • 0 posts edited
  • 0 helpful flags
  • 70 votes cast
May
18
comment How to move subdirectories into another subdirectory within the same directory?
name "[a-y]" has no preceding dash - is that a typo or a syntax I don't know?
Mar
27
comment `command .*` acts on the parent directory
@trlkly Looks like a yes
Feb
23
comment Run command automatically when files are copied into a directory
@Sobrique Unless the inotify triggers a lot, and the rsync only needs to happen every 5 minutes. A'course, could make a simple wrapper that uses date to skip the rsync if it's been less than 5 minutes...
Feb
17
comment Is there a universal way to write Unicode characters?
@vinc17 ctrl-shift-u works in xterm on ubuntu 14.04 for me, just requires hitting space afterwards to combine the codes into the character
Jan
19
comment List files whose name begin with any of the characters between a to k
@A.L See Stephane's comment on Ketan's answer
Dec
18
comment vi commandline, goto line and column
@Dominique You can also vim myfile.xml +15 for row without a plugin, but not column as far as I know
Dec
14
comment Replace %20 with a space in filenames?
@DanijelJ The key reason this works and the version in your question doesn't, that both PM2Ring and Mr.Deathless sidestepped, is that you have to quote the arguments so the new space doesn't split the second filename into multiple arguments, as described in Anthon's answer
Dec
1
comment Automatic login via ssh (no GUI environment installed / no ssh-agent available)?
@nyuszika7h I'm not Hauke, but by storing it in a RAM disk you have to recreate the key after a reboot, since it no longer exists. This would require the user's password/phrase
Dec
1
comment Automatic login via ssh (no GUI environment installed / no ssh-agent available)?
@nyuszika7h "and put it into a RAM disk" so it's never stored on the hard disk
Nov
25
comment Using `case` to handle script arguments
Isn't -remount going to recurse indefinitely?
Nov
24
comment Why is coreutils sort slower than Python?
Python sort has an additional speed advantage, based on your last sample: ASCII numerical order. sort seems to be doing a bit of extra work for uppercase/lowercase comparisons.
Oct
23
comment grep on a variable
Use echo "$line" to preserve existing newlines instead of creating ones with tr
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.