Re: Backup problem using "cp"
- Date: Sun, 6 May 2018 09:48:15 -0500
- From: Richard Owlett <rowlett@xxxxxxxxxxx>
- Subject: Re: Backup problem using "cp"
On 05/06/2018 09:33 AM, Thomas Schmitt wrote:
Richard Owlett wrote:
cp -ax / "/media/richard/MISC
cp: cannot stat '/media/richard/MISC
File name too long
You tell cp to copy / including its sub tree /media/richard/... which is
the target of the copy process. So as soon as reading reaches that tree
it begins to copy itself into itself endlessly until it bonks against
a filesystem limit.
You need to exclude the target directory from being copied.
E.g. by not giving "/" as copy source but rather all its files and
directories except "/media".
Thought I was doing that by specifying -x.
Any way to accomplish that without explicitly listing all directories
except /media ?