Lab 32.1 issue with diff
Hi,
In the lab 32.1, diff claims that the directory doesn't exist with some python related message. However it actually exists:
┌──(alu@nb)-[/tmp] └─$ ls restore/ include ┌──(alu@nb)-[~] └─$ diff -r /tmp/restore/include/ /usr/include/ diff: /tmp/restore/include/python3.11/numpy: No such file or directory
I tried the diff command with two test dirs without an issue:
┌──(alu@nb)-[/tmp] └─$ ls test1 test2 test1: sub1 test.txt test2: test.txt ┌──(alu@nb)-[/tmp] └─$ diff -r /tmp/test1 /tmp/test2 Only in /tmp/test1: sub1 diff '--color=auto' -r /tmp/test1/test.txt /tmp/test2/test.txt 1d0 < xxx
So, the diff command as such works as expected.
Where does this issue come from?
Thanks,
Urs
Answers
-
Hi Urs,
I checked on the labs file and Lab 32.1 is about another thing. Are you sure about the chapter and section?
Regards,
Luis.0 -
Hi Luis,
Yes, it's about backup and restore with tar. At the very end of Lab 32.1, step 4:
"4. Compare the contents with the original directory the archive was made from."diff is used to compare the contents of the original /usr/includes directory, with the restored one. The solution suggests:
$ diff -qr include /usr/includeRegards,
Urs0 -
@albiurs said:
Hi Luis,Yes, it's about backup and restore with tar. At the very end of Lab 32.1, step 4:
"4. Compare the contents with the original directory the archive was made from."diff is used to compare the contents of the original /usr/includes directory, with the restored one. The solution suggests:
$ diff -qr include /usr/includeRegards,
Urs...This is the Link to the Lab:
https://trainingportal.linuxfoundation.org/learn/course/linux-system-administration-essentials-lfs207/backup-and-recovery-methods/lab-exercises?page=10 -
Hi Urs,
I got it. So, I went over Lab 32.1 on Ubuntu 24.04 and it worked fine for me. The diff tool didn't report any issue and the output for the command was empty, as expected:
ubuntu@master:/tmp/backup/restore/usr$ diff -qr include/ /usr/include/
ubuntu@master:/tmp/backup/restore/usr$Per the man page, the 'q' parameter reports only when files differ. And 'r' is for 'recursive'.
What OS and version are you using?
Regards,
Luis.0 -
Hi Luis,
I'm on Debian 12:
┌──(alu@nb)-[~] └─$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" ┌──(alu@nb)-[~] └─$ uname -a Linux nb 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux
I just tried it again with the same python error on this system. But now I also tried it on a Ubuntu VM where I don't get this error too. So I think it must be an issue of my Debian machine...
By the way what means:
#1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1?Thanks,
Urs0 -
Hi Urs,
I just tried it again with the same python error on this system. But now I also tried it on a Ubuntu VM >where I don't get this error too. So I think it must be an issue of my Debian machine...
Yep, it seems to be related to that system or that OS/version in particular.
By the way what means:
1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1?
It indicates that the kernel has support for SMP dynamic preemption.
Regards,
Luis.0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 769 Linux Foundation IT Professional Programs
- 379 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 102 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 7 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 16 Cloud & Containers Training
- 2 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 2 Networking Training
- 2 Open Source Best Practice Training
- 4 System Administration Training
- 1 System Engineering Training
- 2 Web & Application Development Training
- 796 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 91 Storage
- 771 Linux Distributions
- 81 Debian
- 68 Fedora
- 23 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 466 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 79 Network Management
- 101 System Management
- 46 Web Management
- 127 Mobile Computing
- 20 Android
- 92 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 400 Off Topic
- 124 Introductions
- 32 Study Material
- 1K Programming and Development
- 310 Kernel Development
- 705 Software Development
- 1K Software
- 409 Applications
- 182 Command Line
- 5 Compiling/Installing
- 70 Games
- 318 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)