Linux recursively modifies all files in the current terminal and files in subfolders

When using the catkin_make command to compile a workspace, two conditions must be met:

1. The file modification time this time is greater than the last file modification time

2. The time to modify the file this time is less than the current computer time

The reason for this regulation is that the time after the system restart of the microcomputer (Raspberry Pi, Jetson Nano, etc.) is the time when the system was updated online last time. If you continue to use or recompile the workspace after the last disconnection, the above conditions will be violated. Therefore, the system time must be modified after the system restarts.

Steps:

1. sudo date -s "current system time"

2. Operation command: find ./* -exec touch {} \; (be careful not to omit ";")

Guess you like

Origin blog.csdn.net/m0_48639942/article/details/129962744