I upgraded from Ubuntu 18.04 LTS to Ubuntu 20.04.3 LTS on my desktop on 11-12-2021.
I compiled con.c on the new gcc version 9.3.0-17 compiler and it gave me warnings on
using sprintf(). I converted all the sprintf()'s warnings to snprintf()'s and got a clean compile.
I copied the folder that contained con.c and 8 other .c files and their .o files to an external
USB drive. It copied all but the con.c and con.o. files. There is no error when copying these
files to another folder on the Internal hard drive.
When trying to copy con.c to a USB drive, it gives me these error messages:
Files (Nautilus) gives me this error message:
Error while copying "con.c"
There was an error copying the file
into /media/rob/TOSHIBA EXT/000/c/projects/ai/builds/40-49
Invalid
filename
Xfe file manager gives me this error message:
An error has occurred during the copy file operation!
The terminal produces this:
rob@rob-MS-7721:~$ sudo cp /home/rob/c/con.c "/media/rob/TOSHIBA
EXT/000/c/projects/ai/builds/40-49/con.c" cp: cannot create regular
file '/media/rob/TOSHIBA EXT/000/c/projects/ai/builds/40-49/con.c':
Invalid argument
rob@rob-MS-7721:~$ sudo cp /home/rob/c/util.c "/media/rob/TOSHIBA EXT/000/c/projects/ai/builds/40-49/util.c"
As you can see it will copy util.c but will not copy con.c to the USB drive.
I have used Google to searched for answers on this but there seems to be very little out there
on Ubuntu 20.04 outside of installation, upgrade and how to mount a USB drive etc.
I got around this by renaming con.c to con0.c and it copied fine. But, it will not let me rename
con0.c to con.c on the USB drive.
Ubuntu 18.04 copied this file without error.
Can anyone tell me if con.* has become a protected file name or if there is this a bug
in Ubuntu 20.04 that is producing this error?