I want to convert this GNU command into a python function:
find folder/ 2>/dev/null > file.txt
The find will list all files and folders from the directory recursively and write them to a file.
What I have now in Python is:
import os
project="/folder/path"
i=0
for (project, dirs, files) in os.walk(project):
print project
print files
i += 1
But now I am trying to make the output exactly as find does.