Command to list all files except . (dot) and .. (dot dot)
问题 I'm trying to find a command that would list all files (including hidden files), but must exclude the current directory and parent directory. Please help. $ ls -a \.\.. 回答1: Read ls(1) documentation (perhaps with man ls ). At least, take the habit of trying ls --help or better yet (since ls might be aliased, e.g. in your ~/.bashrc ) /bin/ls --help You'll get something starting with: Usage: ls [OPTION]... [FILE]... List information about the FILEs (the current directory by default). Sort