Skip to main content

All Questions

Tagged with
1 vote
1 answer
211 views

On Linux, how can one diff directories, excluding files by name, but including directories of the same name?

Consider the following dir/file structure (all leaf nodes are regular files, not that it really matters): $ tree . ├── cool_1 │   ├── dumb │   │   ├── file1 │   │   └── file2 │   └── foo │   └── ...
SirPentor's user avatar
  • 119
0 votes
1 answer
2k views

Is there a way to make Unix diff -r compare only differences in filenames, but not check if any single file actually differs?

I need to compare two large directories with a lot of files in them. I tried using: diff -r Directory1 Directory2 but unfortunately the process is really slow due to the amount of files and their ...
Francesco Ghizzo's user avatar
0 votes
0 answers
69 views

How to set up diff so that it copies all modified and new files and subfolders recursively from a folder at a given interval?

How to set up diff so that it copies all modified and new files and subfolders recursively from a folder at a given interval? Hi, I have a folder (A) with a large number of subfolders. I want to ...
Vesa's user avatar
  • 428
1 vote
1 answer
944 views

Subtract files from one another recursively between two similar directories

I'm trying to concoct a way to grab two (nearly identical) directories and show me the difference between all files in the two directories. Looking for two different things: 1- List all files (...
Orun's user avatar
  • 145
7 votes
2 answers
12k views

formatting of the diff output

I have 2 files that I want to differ. File B is produced appending some new line to file A. I want to highlight the appended data by using diff. I would like to avoid printing out the '>' characters ...
Abruzzo Forte e Gentile's user avatar
3 votes
2 answers
4k views

Tool for diffing large files

When I use "diff" to find the difference between two large data files, diff A.txt B.txt > dif.info it is output: diff:memory exhausted or add the argument "-H" diff -H A.txt B.txt > dif....
Dong's user avatar
  • 43
3 votes
1 answer
8k views

why doesn't my .gitconfig work? (for external diff)

I added this in ~/.gitconfig: [diff] external = mvimdiff [difftool] prompt = false and made a 755 /bin/mvimdiff that: #!/bin/sh mvim -d "$2" "$5" in order to invoke MacVim as my git diff ...
Timothy's user avatar
  • 215
3 votes
2 answers
6k views

Diff and ignore lines missing in one file

I want to diff two files and ignore lines that are present in one file but missing in the other. For example File1: foo bar baz bat File2: foo ball bat I'm currently running the following diff ...
Millianz's user avatar
  • 101
4 votes
3 answers
2k views

Diff 2 files while ignoring parts of lines

I would like to diff a file system. Currently my bash script prints out the file system recursively into a file (ls -l -R) and diffs it with an expected output. An example for a line in this file ...
Millianz's user avatar
  • 101
17 votes
4 answers
22k views

How to diff directories for different files, but not line-by-line

I want to see, recursively, files that are different in two directories. Diff can do this, but it shows me the line-by-line differences, which I don't want. Is there a tool that does this, or a way to ...
user13743's user avatar
  • 1,721