Finding the length of files and file path of directory structure in a Linux file system.
- by Robert Nickens
I have a problem on a Linux OS running a version of SMB where if the absolute path to a directory within a Shared Folder is greater than 1024 bytes and the filename component is greater than 256 bytes the SMB service crashes and locks out all other services for network access like, SSH and FTP rendering the machine mute.
To keep the system for crashing I’ve temporarily moved a group of folders where I think the problem path may be located outside of Shared Folder. I need to find the file and file path that exceeded this limitation and rename them or remove them allowing me to return a bulk of the files to the Shared Folder.
I’ve tried the find and grep commands without success.
Is there a chain of commands or script that I can use to hunt down the offending files and directory?
Please advise.