Time to read: 1 minutes.
postscollection, categorized under Bash, Open Source, Ubuntu.
Today I am once again re-installing WSL2 on one of my laptops. Seems that a Windows 10 installation’s half-life is measured in months, after which time a reset is required. The reset preserves data, but not installed programs and not the WSL setup.
When I set up an OS I often use a pre-existing system’s files as templates for the new system’s files.
Meld is a fantastic, F/OSS file and directory merge tool. 2-way and 3-way merges are supported. Meld uses X Windows for its user interface. GWSL makes it easy to run X apps on WSL and WSL2.
$ sudo apt install meld
Merging a remote file with a local file using Meld is easy once you know how. Unless the remote file system is mounted locally, Meld cannot be used to modify remote files and directories, just local files and directories.
Following is the incantation I used to display my local
.profile and interactively merge it with my profile
on an Ubuntu Linux machine called
$ meld ~/.profile <(ssh mslinn@gojira cat .profile)&
The above runs
ssh in a subshell, logs in as
to the machine called
then displays the contents of
Meld compares the output of
cat with the local copy of
and displays the differences:
Meld makes it easy to reconcile file versions.