2 votes
Accepted

Write directories, subdirectories and file names to .txt file

tree command with -o option. For example to output contents of /home to file.txt tree /home -o file.txt You will probably need to install tree package, since it is usually not installed by default. ...
  • 1,936
2 votes
Accepted

Dangers of executable file with '#' in name?

In all sh-like shells, including all versions of bash and zsh, # only starts a comment when it's at the beginning of a word. That means it must be at the beginning of the script or nested shell (e.g. $...
1 vote

Dangers of executable file with '#' in name?

The GNU Bash Reference Manual for Version 5.2 of September 2022 says that "a word beginning with # causes that word and all remaining characters on that line to be ignored". And a word is &...
  • 123

Only top scored, non community-wiki answers of a minimum length are eligible