I'm writing a bash script which in a certain part of the process should list the files in a directory older than 1 day and print the list to a text file to work with it later. This is the current command I have:
find . -mtime +0 > list.txt
The problem with this command is that it prints the filenames preceded by "./", e.g.:
./file1
./file2
./file3
How can I do to print only the filenames in this way?
file1
file2
file3