Kubuntu won't boot
Ralf Mardorf
kde.lists at yahoo.com
Thu Jul 29 02:08:23 UTC 2021
An even more save solution is to not struggle with globbing when doing
the backup. When restoring from the backup, there's no way to avoid
globbing.
If only another owner is allowed to access the files, it's better to
sudo -i instead of using sudo command , otherwise
auto-completion doesn't work.
FWIW I'm using /usr/bin/ls instead of ls, because an alias for ls does
run lsd (a replacement for ls). To properly view the output of lsd
special fonts are needed. The fonts are installed on my machine, but
not many people do have those fonts installed, too.
To avoid globbing you simple copy the source mount point into the
target mount point.
[rocketmouse at archlinux tmp]$ sudo /usr/bin/ls -hAl mount/target/
total 0
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo /usr/bin/ls -hAl mount/source/
total 0
drwxr-xr-x 2 root root 80 Jul 29 03:49 'path with spaces'
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo /usr/bin/ls -hAl mount/source/path\ with\ spaces/
total 0
-rw-r--r-- 1 root root 0 Jul 29 03:49 'another file with spaces.txt'
-rw-r--r-- 1 root root 0 Jul 29 02:58 'file with spaces.txt'
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo cp -ai mount/source/ mount/target/; echo $?
0
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo diff -r --no-dereference mount/source/ mount/target/source/; echo $?
0
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo /usr/bin/ls -hAl mount/target/
total 0
drwxr-xr-x 3 root root 60 Jul 29 02:58 source
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo /usr/bin/ls -hAl mount/target/source/
total 0
drwxr-xr-x 2 root root 80 Jul 29 03:49 'path with spaces'
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$
[rocketmouse at archlinux tmp]$ sudo /usr/bin/ls -hAl mount/target/source/path\ with\ spaces/
total 0
-rw-r--r-- 1 root root 0 Jul 29 03:49 'another file with spaces.txt'
-rw-r--r-- 1 root root 0 Jul 29 02:58 'file with spaces.txt'
FWIW "--no-dereference" isn't required to diff this example, but you
much likely need it, to do a diff with a real backup.
More information about the ubuntu-users
mailing list