What are the dark corners of Vim your mom never told you about? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Use grep –exclude/–include syntax to not grep through certain files

I’m looking for the string foo= in text files in a directory tree. It’s on a common Linux machine, I have bash shell: grep -ircl “foo=” * In the directories are also many binary files which match “foo=”. As these results are not relevant and slow down the search, I want grep to skip searching … Read more

How can I convert a Unix timestamp to DateTime and vice versa?

There is this example code, but then it starts talking about millisecond / nanosecond problems. The same question is on MSDN, Seconds since the Unix epoch in C#. This is what I’ve got so far: public Double CreatedEpoch { get { DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime(); TimeSpan span = … Read more

Given two directory trees, how can I find out which files differ by content? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 12 months ago. Improve this question If I want find the differences between two directory trees, I usually just execute: diff -r dir1/ dir2/ This … Read more

How can I exclude directories from grep -R?

I want to traverse all subdirectories, except the “node_modules” directory. 14 s 14 Recent versions of GNU Grep (>= 2.5.2) provide: –exclude-dir=dir which excludes directories matching the pattern dir from recursive directory searches. So you can do: grep -R –exclude-dir=node_modules ‘some pattern’ /path/to/search For a bit more information regarding syntax and usage see The GNU … Read more