I have a repertory called 'data' and have multiple random files in it. I want to create a 'results.txt' file with all the names of the files in 'data'.
I want to use only the command echo in one command. So far I've done:
cd data
and then
echo * > ../results.txt
It does work but not in the same command.