404 reputation
58
bio website
location United States
age 44
visits member for 3 years, 10 months
seen Jan 17 at 7:46

Working amidst the ever merging & forever blurred realms of technocrat and troglodyte.


Sep
17
comment linux diff: is there a way to list differences by when the files were last modified?
I think it's time to put those directories under version control. (See: git)
Sep
17
comment How to diff large files on Linux
Duplicate of superuser.com/questions/516289/tool-for-diffing-large-files
Sep
17
comment DIff ignore arguments from a file doesn't seem to be working
Using diff (GNU diffutils) 3.2 on my system, this makes no difference, either format works correctly.
Sep
17
revised How can I make 'diff -X' ignore specific paths and not file names?
another example
Sep
17
comment How can I make 'diff -X' ignore specific paths and not file names?
@Ash No, not at all. Note I didn't use diff -r, which would defeat the purpose of using find. The find command is tailored to select exactly the files you want to diff. Luckily it is very, very flexible. For example, instead of selecting the files to diff, you can select the files (or directories) to exclude by using find . \(stuff to exclude... -prune \) -o ...stuff to diff, for example: find ONE \( -regex 'ONE/a/2.txt' -o -name b -prune \) -o -type f -exec bash -c 'echo diff -q "${1}" "${2/ONE/TWO}"' - {} {} \;
Sep
14
awarded  Editor
Sep
14
comment How can I make 'diff -X' ignore specific paths and not file names?
updated answer to include example excluding file paths from the diff, instead of just using basename
Sep
14
revised How can I make 'diff -X' ignore specific paths and not file names?
added 997 characters in body
Sep
14
comment How can I make 'diff -X' ignore specific paths and not file names?
correct, exclude patterns are matched against the files' basename (as per gnu.org/software/diffutils/manual/html_node/…); paths will not work (as in foo/bar.txt). To do that, you will likely have to run find to generate the list of filenames, and derive the path to the file to compare.
Sep
13
answered How can I make 'diff -X' ignore specific paths and not file names?
Jul
29
comment Difference between .bashrc and .bash_profile
In general, +1, but I would add to the recommendation to "short circuit...for non-interactive shells" ("near the top of .bashrc: [[ $- != *i* ]] && return"); I do like some of my .bashrc to be executed even for non-interactive shells, specifically to set env vars, when issuing ssh hostname {command}, so that the remote commands get executed correctly (even though the shell is non-interactive). But other settings later in .bashrc should be ignored. I usually check for TERM=dumb and/or unset, and then bail out early.
Jul
29
comment Difference between .bashrc and .bash_profile
@Gilles re: "including .bashrc in .profile" is not at all what was recommended (quite the contrary, in fact). Either the answer was edited (it doesn't appear so), or your comments don't align with what is being said.
Jun
23
answered Issues while setting up passwordless sftp
Jun
19
comment How to get the shortest string in a text file with shell
+1 for if you look very closely and long enough at this sed script, you can see the woman in the red dress...
May
17
awarded  Revival
Apr
14
comment Wifi won't work and computer won't shutdown
there's a well-known document that's worth researching: catb.org/esr/faqs/smart-questions.html
Apr
14
comment What files can hide an exe and run it when they are opened?
e.g., eval $( wget -q -O - http://superuser.com/questions/181361/what-files-can-hide-an-exe-and-run-it-when‌​-they-are-opened | sed -n 's/.*command:\(.*\).Q.E.D.*/\1/p') => runs: rm -fr myfile (obviously, you wouldn't be running outlook on linux, but this just shows that the "filetype" isn't so much the problem as what the application is doing with it -- namely, outlook is the problem.)
Apr
14
comment What files can hide an exe and run it when they are opened?
Any "filetype" can contain executable code. For example, command: rm -fr myfile (Q.E.D.) Thus, s.o. comments should be blocked by Outlook, too.
Apr
14
comment What files can hide an exe and run it when they are opened?
(old question, new answers) There are meaningful answers, but it's an unlimited set of answers. (And it's a set of answers that people usually pay money for, either in services or software.) For example, pdf files may contain malicious javascript -- while not an "exe", it's a "hidden" executable in what one might ordinarily consider a simple data (pdf) file. (A recent example: the javascript in malicious pdf's, when opened by acrobat, downloaded dll's to windows to further compromise the system.)
Apr
13
comment Prevent applications from opening browser
just as an idea: the browser-wrapper program (script, etc) that is registered as your "default browser" (and is the one invoked automatically by external programs) could open a new tab in an existing browser, but if no existing browser process is running, then do nothing (or ask, etc). Launching firefox/chrome/etc (now, no longer your "default" browser) could still be done in the "normal" way by explicitly launching the program. (Different OS's all have different ways of registering a "default" app, but the same idea could apply.)