When you type ls filedot , the shell doesn't interpret filedot as a pattern or a file name with a dot prefix. Instead, it treats it as a literal file name.

: This represents the directory one level above your current location in the file system hierarchy . The ls command | Computing

To manage or view "dotfiles" (hidden files starting with a period) using the ls command in a Unix-like environment (Linux or macOS), you primarily use the -a or -A flags. Viewing Dotfiles

filedot="myfile.txt" ls $filedot

Common dotfiles: .bashrc , .gitconfig , .hidden_folder

ls -a > list.txt List one file per line: ls -1 > list.txt For Windows (Command Prompt) Use the dir command with the redirection operator: Basic list: dir > list.txt Clean list (names only): dir /b > list.txt Why use "dot"?