New answers tagged

0

If the aim is to preserve file content (avoid losing data), I would concentrate on file equality, not the naming of directories of files. Start with running this on each of the top-level folders, and save the output (it will run for a while!). find FolderA -type f -print0 | xargs -0 cksum > FoldA.cksum find FolderB -type f -print0 | xargs -0 cksum > ...


0

Do something simple as copy one directory onto another and ignore/replace identical (by path) files. If this will produce some duplicates (different path, same file name) you can try to find them later. Want "gui" solution? Use mc. When asked what do do with duplicates you can choose "update" or "if size differs". Or use archiver like zip/7z/rar/tar pack ...


0

For each line, change all |-characters to / to form a pathname, create the directory, create the file at the end of the pathname. tr '|' '/' <file | while IFS= read -r pathname; do mkdir -p "$(dirname "$pathname")" && touch "$pathname" done Result: $ tree ABC ABC |-- A1 | `-- B1 | `-- A.txt `-- BB |-- CD | `-- AF | ...


-2

Yes you can but it will get polluted by other software installs. I use $HOME/local and modify bashrc with path like export PATH=.:${HOME}/local/bin:${PATH} export LD_LIBRARY_PATH=${HOME}/local/lib:${LD_LIBRARY_PATH} export PREFIX=${HOME}/local so you know what you've installed and since they are first on the path stack they will be found before the ...


1

find has to deliberately exclude . and .. It has to avoid descending into them, as it would do for other directories returned by readdir(). Rather than show the directories . and .. but not show any of their contents, it excludes them entirely. This is the desired behaviour, for example if you used find -exec touch \{\} \;. Users would not wish this ...


0

~/.local/bin This is defined in systemd's standard that has the following to say about the directory's contents: Executables that shall appear in the user's $PATH search path. It is recommended not to place executables in this directory that are not useful for invocation from a shell; these should be placed in a subdirectory of ~/.local/lib/ instead. ...


Top 50 recent answers are included