我想制作/sys
目录的精确副本,并尝试了以下命令:
sudo cp -ra /sys ~/Documents/dir1
它不像我预期的那样工作......我收到很多错误消息,例如:
cp: error reading '/sys/fs/cgroup/memory/memory.force_empty': Invalid argument
cp: error reading '/sys/devices/system/cpu/cpu0/cache/index0/power/autosuspend_delay_ms': Input/output error
cp: cannot open '/sys/devices/system/clockevents/clockevent0/unbind_device' for reading: Permission denied
cp: error reading '/sys/devices/virtual/block/loop0/trace/enable': No such device or address
为什么复制每个文件还sudo
不够?cp