cat>/volume1/dir1/dir2/
will never work because the trailing slash in /volume1/dir1/dir2/
indicates this has to resolve to a file of the type directory. You cannot redirect a stream of bytes to a directory itself.
cat>/volume1/dir1/dir2/
will never work because the trailing slash in /volume1/dir1/dir2/
indicates this has to resolve to a file of the type directory. You cannot redirect a stream of bytes to a directory itself.