19,017 reputation
23971
bio website
location United States
age
visits member for 2 years, 11 months
seen 5 hours ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


Jun
26
comment Do Links to /tmp files get deleted?
@strugee Most systems do not allow hard links to directories.
Jun
26
comment Recursively iterate through files in a directory
find ... -exec bash -c 'echo filename is in \$0: "$0"' {} \; is a better way to do it.
Jun
24
comment Extract file name from find command
Forget the find part for now. Do you even have the mailing part working correctly? First come up with a mail_file.sh script or one liner that does what you want, and then use it in find. find itself is not a scripting language. You can't just chain -exec like that.
Jun
24
awarded  Nice Answer
Jun
20
comment How to combine Bash's read with HERE-document when shopt -os errexit is in place?
@mikeserv Did you confuse me with OP? I am not the one that asked the question. Ask OP, not me. Note that your question is something I already pointed out to the OP in my first comment: "I assume your actual code is a bit more complex than your toy example, because in this case assigning to the variable directly would be much simpler.", i.e. desc='bla bla'.
Jun
19
comment Make vim stop splitting my Git commit messages
(continued)... So, this is not technically an answer, but you are supposed to make the highlighting not ugly by writing a properly formatted git commit message. Try to keep line one below 50 characters. Line 2 is supposed to be blank, which is why it is being colored a BOLD RED for "Warning: this text isn't supposed to be here!" Type the extended message beginning on line 3. Vim will automatically break your lines at 72 characters. Let it do so. If you need Vim to redo the line breaks because you did some editing, highlight the paragraph and do gq to fix the line breaks.
Jun
19
comment Make vim stop splitting my Git commit messages
This is Vim's built-in file type syntax highlighting for git commit messages trying to enforce a certain format for git messages. Your highlighting looks ugly because your git commit message is "ugly", in the sense that it does match the format Vim is expecting you to follow. Both the gitcommit.vim syntax highlighting module and the guidelines were written by Tim Pope. You can read them here: tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html. For a quick summary, make the first line a 50 character summary, leave a blank line, and then write your paragraphs below.
Jun
19
comment How to combine Bash's read with HERE-document when shopt -os errexit is in place?
See unix.stackexchange.com/q/13272/9537. What you want is read ... <<EOF || true not read ... || true <<EOF. The <<EOF is for the read not the true. I assume your actual code is a bit more complex than your toy example, because in this case assigning to the variable directly would be much simpler.
Jun
18
awarded  Great Answer
Jun
18
awarded  Nice Answer
Jun
17
awarded  Enlightened
Jun
17
awarded  Nice Answer
Jun
16
comment sudoers conditional/combo command is possible?
@AquariusPower "only-writeable by root" is not the same thing as "owned by root" and it is the former that matters.
Jun
16
revised Escape on Control key, Control on Capslock key, Capslock on Escape key
added 70 characters in body
Jun
14
answered Escape on Control key, Control on Capslock key, Capslock on Escape key
Jun
14
comment Multiple XkbOptions in xorg.conf
It should be the first, commas with no spaces. Can you post the exact line you are having trouble with?
Jun
14
comment Use find to find certain directory and delete all files in it except one directory
What happens if you have a directory like ./Library/Caches/not_Snapshots/Caches/Snapshots/? Do you want to delete that directory because it is inside ./Library/Caches/not_Snapshots/ or save it because it is a Snapshots directory?
Jun
13
reviewed Approve suggested edit on Looping the listing files in UNIX
Jun
13
comment Looping the listing files in UNIX
The problem is you haven't explained what you want to do. "Check" is not an executable that you run. "Check" is something you can do with your eyes by looking to see if there is a d. Also, I presume your choice of -rt means the sort order is significant?
Jun
13
comment Looping the listing files in UNIX
You can already see which are directories - those are the ones that start with d.