How can I diff two files with full context?

You can also override the diff formatting behavior to get your desired behavior without using side-by-side mode: diff –new-line-format=”+%L” –old-line-format=”-%L” –unchanged-line-format=” %L” file1 file2 This command will show you the full file as context and be closest in format to diff -u file1 file2

Difference between shell and environment variables

Citing this source, Standard UNIX variables are split into two categories, environment variables and shell variables. In broad terms, shell variables apply only to the current instance of the shell and are used to set short-term working conditions; environment variables have a farther reaching significance, and those set at login are valid for the duration … Read more

grep a large list against a large file

Try grep -f the_ids.txt huge.csv Additionally, since your patterns seem to be fixed strings, supplying the -F option might speed up grep. -F, –fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX.)

rsync prints “skipping non-regular file” for what appears to be a regular directory

Are you absolutely sure those individual files are not symbolic links? Rsync has a few useful flags such as -l which will “copy symlinks as symlinks”. Adding -l to your command: rsync -rtvpl /source/backup /destination I believe symlinks are skipped by default because they can be a security risk. Check the man page or –help … Read more