0

What does the following command do in Linux?

ls * >  file1

Does it simply copy all the file names in the current directory into a new file?

Kusalananda
  • 333,661
Guest
  • 3
  • @Guest, you will get file2 when you cat file1 and yes, only the name(file2). – Riz Jan 28 '22 at 19:17
  • references: What are the shell's control and redirection operators?, https://mywiki.wooledge.org/BashGuide/InputAndOutput, https://mywiki.wooledge.org/BashGuide/Patterns – ilkkachu Jan 28 '22 at 19:44