/volume1/Folder/0000/AAA/one
/volume1/Folder/0001/AAA/two
/volume1/Folder/0001/BBB/three
/volume1/Folder/0002/CCC/four
...
I want to get a .txt file, with all not-empty folders directories. But I want this file to write without the /volume1/Folder/
, ie, I want to print it like this :
0000/AAA/one
0001/AAA/two
0001/BBB/three
0002/CCC/four
...
This is the code that I'm using, but this is writing the full path (and I know that by adding -printf '%f\n' it writes only the last folder, but I don't want that!)
find /volume1/Folder/* -mtime -1 -type d -maxdepth 2 -not -empty > /volume1/Folder/NotEmptyFolders.txt
Can someone help me?