Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

You cannot and must not copy files in /proc, or /sys. Generally speaking, you need to arrange to copy only the disk-backed files.

The files under /proc and /sys are generated by the kernel on the fly when you read them. Their contents provides information about the running system. For example, /proc/1234 is a directory where you can read information about the process with PID 1234 (if there is a running process with this PID). There is no data to copy to a disk here. For more information, read What happens when I open and read from /proc?What happens when I open and read from /proc? and perhaps also deleting a 'file' under /proc or /devdeleting a 'file' under /proc or /dev.

To copy a whole filesystem under Linux, use cp -x.

You cannot and must not copy files in /proc, or /sys. Generally speaking, you need to arrange to copy only the disk-backed files.

The files under /proc and /sys are generated by the kernel on the fly when you read them. Their contents provides information about the running system. For example, /proc/1234 is a directory where you can read information about the process with PID 1234 (if there is a running process with this PID). There is no data to copy to a disk here. For more information, read What happens when I open and read from /proc? and perhaps also deleting a 'file' under /proc or /dev.

To copy a whole filesystem under Linux, use cp -x.

You cannot and must not copy files in /proc, or /sys. Generally speaking, you need to arrange to copy only the disk-backed files.

The files under /proc and /sys are generated by the kernel on the fly when you read them. Their contents provides information about the running system. For example, /proc/1234 is a directory where you can read information about the process with PID 1234 (if there is a running process with this PID). There is no data to copy to a disk here. For more information, read What happens when I open and read from /proc? and perhaps also deleting a 'file' under /proc or /dev.

To copy a whole filesystem under Linux, use cp -x.

Source Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

You cannot and must not copy files in /proc, or /sys. Generally speaking, you need to arrange to copy only the disk-backed files.

The files under /proc and /sys are generated by the kernel on the fly when you read them. Their contents provides information about the running system. For example, /proc/1234 is a directory where you can read information about the process with PID 1234 (if there is a running process with this PID). There is no data to copy to a disk here. For more information, read What happens when I open and read from /proc? and perhaps also deleting a 'file' under /proc or /dev.

To copy a whole filesystem under Linux, use cp -x.