How to see the contents of a file with blank filename?
Solution 1:
Inodes to the rescue: first, do ls -li
to list all files with their inodes. The inode is the number on the left. Note the inode number of your invisible file. Then:find . -inum xxx -exec nano {} \;
replacing xxx with the inode number, and possibly nano with the editor of your choice.
Explanation:
The find command finds the file with inode number xxx, then executes a command, in this case: passes it to nano
. The {}
is a placeholder for the filename; the \;
at the end indicates the end of the command.
Solution 2:
You can do a
gedit *
to open all files (brute force approach) Or better
gedit " "*
if you are sure that the file begins with a space character.
(you can replace gedit with your favorite editor)