Write Output of Bash Command to Log File - Example.
List the files in a directory in Unix. You can use the ls command to list the files in any directory to which you have access. For a simple directory listing, at the Unix prompt, enter:. ls. This command will list the names of all the files and directories in the current working directory.