In Linux special characters such as "#", "-" and other special characters cannot be access directly either by manual copy or via script. For example this path below it has the sharp "#" key: /usr/dfiles/$line/Tasks/#msgs/ cp "/usr/dfiles/$line/Tasks/#msgs/*.eml" "/mnt/NAS/Tasks1/line/" Even though the path is enclosed by quotation marks, Linux system will show "No such file or directory". Since the system is unable to find the "#msgs" directory. As a work around in this issue is to append "--" double dash before the cp command and everything will work fine. So, this command below will work. cp -- "/usr/dfiles/$line/Tasks/#msgs/*.eml" "/mnt/NAS/Tasks1/line/" Copying one folder is quite practical to do it by hand rather by script. But if you are copying hundreds or thousands of folders, doing it manually is quite painful. To copy hundreds or tho...
Make the world a better place by sharing knowledge, ideas and anything that you can give that comes from the heart.