Finding files older than x days within directory with spaces

Hi,

I am trying to run a command that finds all files over x amount of days, issue is one of the directories has spaces within it.

find /files/target directory/*/* -type f -mtime +60

When running the above the usual error message is thrown back

+ find '/files/target\' 'directory/*/*' -type f -mtime +60
find: �/files/target\\�: No such file or directory
find: �directory/*/*�: No such file or directory

I have tried backspacing out the space

/target\ directory/

and also putting into quotes

/"target directory"/

But still find issues.

Any help is much appreciated.

The directory to search by find does not really need the /*/* at the end. It will start where you put it and search down from that point.

Try it like this, escaping the space properly and without any quoting:-

find /files/target\ directory -type f -mtime +60

An alternate might be with quoting:-

find '/files/target directory' -type f -mtime +60

I hope that this helps,
Robin