Tag Info

New answers tagged

19

If you have rsync (remove --dry-run to do it for real): rsync --dry-run --remove-source-files -avHAX /unencrypted/ /encrypted Otherwise, using bash4+ and GNU stat: #!/bin/bash set -e shopt -s nullglob globstar for from in /unencrypted/**/*; do to="${from/\/un//}" if [[ -d "$from" ]]; then echo mkdir -p "$to" echo chmod "$(stat ...


2

One option would be UDF. Here is a short tutorial.


3

What I do is to store tarballs on the USB drive (formatted as VFAT). I'm wary of reformatting USB drives, they are build/optimized for VFAT so to level wear, and I'm afraid it will die much sooner with other filesystems. Besides, formatting another way will make it useless for ThatOtherSystem...


2

"It's not a bug, it's feature..." It would be quite evil if every unprivileged user could write to every Linux file system just because he feels entitled to. You must explicitely allow him to. After creating a file system only root is allowed to. # You (as root) can either give write write access to everyone: chmod 777 /mount/point # or you give the whole ...


2

You need to have a look at the man pages for proc. Look at /proc/[pid]/* entries and pick which files you want. You do not want to copy everything. As an example you have /proc/[pid]/mem which is all the virtual memory for a process including shared etc. – i.e. size of all your memory. Further you are not able to read it unless the process own mem or it is ...


1

Your pattern may exclude the files you don't want to copy, but it doesn't exclude the directories containing them, and you told cp to copy recursively. So the files are copied anyway. Worse than that, if you have a source tree like foo foo/bar.txt hello hello/world hello/world/wibble.txt then the pattern expands to foo hello hello/world ...



Top 50 recent answers are included