Search code examples
shellcommand-linetouch

How to create a file with its name starting with dash in Linux? (ex "-file")


How can I create a file named "-file" using command line in Linux?


Solution

  • ls -ltr | awk '$NF ~ /^--/{print "rm ./" $NF}'|sh