Create a file with newline symbol in Linux

If for some reasons one needs to create a file with UTF symbols in filename, the following command helps:

touch new$'\n'file.txt

20140721_155556

Or you can simply rename existing file:

mv goodfile.txt bad$'\n'file.txt
mv goodfile.txt $'bad\nfile.txt'

20140721_155921

Hope this helps 🙂

Tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *