why in an empty folder executing ls > empty.txt shows me empty.txt inside empty.txt ?
it is not poetry, it is true and I do not know why.
For me, they way to think ls > empty.txt is the following step by step:
lsis executed, and I get the output (void at that very moment)>means I get the output of the previous command (actuallyfd 2)empty.txtis the name of the file that gets the output ofls(nothing).
So why running
cat empty.txt
I get
empty.txt
if the folder is empty?