The sdc1 was mounted on /media/debian/Ventoy.

debian@debian:~$ sudo blkid | grep Ventoy
/dev/sdc1: LABEL="Ventoy" UUID="F82D-76BE" BLOCK_SIZE="512" TYPE="exfat" PTTYPE="dos" PARTUUID="1af31d46-01"

debian@debian:~$ df  /media/debian/Ventoy
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sdc1       15324256 7971552   7352704  53% /media/debian/Ventoy

Show content in directory material.

ls  material
'Best Semiconductor Stocks & ETFs in 2021 | The Motley Fool_files'  'How To Use AppImage in Linux [Complete Guide] - It'\''s FOSS_files'
'Best Semiconductor Stocks & ETFs in 2021 | The Motley Fool.html'   'How To Use AppImage in Linux [Complete Guide] - It'\''s FOSS.html'

Copy it into /tmp:

sudo cp -R  material    /tmp

It works fine. Then copy it into sdd1:

sudo cp -R  material    /media/debian/Ventoy
cp: cannot create directory '/media/debian/Ventoy/material/Best Semiconductor Stocks & ETFs in 2021 | The Motley Fool_files': No such file or directory
cp: cannot create regular file '/media/debian/Ventoy/material/Best Semiconductor Stocks & ETFs in 2021 | The Motley Fool.html': No such file or directory

Why can't I copy all files in the directory to a USB storage device?


1 Answer 1


My eyes jump straight to the fact that your file name has a pipe | in it.

According to your output the file system type is exfat. FAT and its derivatives do not support inclusion of pipe, along with a few other things, in file names.

If you were to rename the file to strip the problematic characters I’d imagine you’d have more success. There are a number of ways to do this en masse. That said, if HTML files have links to each other this would break the links, so you would have to do further work to fix the links.

Another option would be to reformat the USB device as a more tolerant type, such as ext family. But this might hamper your ability to use the USB stick on a non Linux based OS, but I don’t know if that’s a consideration for you.

  • 21
    ... or possibly to put the file(s) into some archive format, like tar? (if the USB is exclusively for transfer the file(s) between two non-DOS filesystems)
    – Kusalananda
    Aug 21, 2021 at 7:35
  • 3
    Typo: extfat => exfat. The best widely-compatible filesystem with no filename restrictions (except / and null) is probably NTFS, though files/paths with those names may not display correctly or be easily accessible in applications that use Win32 APIs on Windows. The NTFS filesystem itself supports them and they'll work fine on Linux and also in WSL.
    – Bob
    Aug 22, 2021 at 14:43
  • Thanks Bob, typo fixed.
    – bxm
    Aug 22, 2021 at 19:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .