Linux commands: Difference between revisions
Jump to navigation
Jump to search
→List directory or files / list directory contents
m (Text replacement - "== references ==" to "== References ==") |
|||
| Line 156: | Line 156: | ||
* {{Gd}} create ls command in {{Win}} command prompt: {{kbd | key = echo dir %1 > %systemroot%\system32\ls.bat}} Thanks, hmjd!<ref>[http://stackoverflow.com/questions/9362692/how-to-create-ls-in-windows-command-prompt How to create ls in windows command prompt? - Stack Overflow]</ref> | * {{Gd}} create ls command in {{Win}} command prompt: {{kbd | key = echo dir %1 > %systemroot%\system32\ls.bat}} Thanks, hmjd!<ref>[http://stackoverflow.com/questions/9362692/how-to-create-ls-in-windows-command-prompt How to create ls in windows command prompt? - Stack Overflow]</ref> | ||
* List all files and directories including hidden ones in the current directory. On {{Win}} is {{kbd | key=<nowiki>dir /a</nowiki>}}, and on {{Mac}} or {{Linux}} is {{kbd | key=<nowiki>ls -a</nowiki>}}<ref>[http://www.computerhope.com/issues/ch001039.htm How to see hidden files in MS-DOS and the Command Prompt]</ref><ref>[http://www.cyberciti.biz/faq/bash-shell-display-only-hidden-dot-files/ Bash Shell: Display All Hidden Dot Files In a Directory]</ref>. | * List all files and directories including hidden ones in the current directory. On {{Win}} is {{kbd | key=<nowiki>dir /a</nowiki>}}, and on {{Mac}} or {{Linux}} is {{kbd | key=<nowiki>ls -a</nowiki>}}<ref>[http://www.computerhope.com/issues/ch001039.htm How to see hidden files in MS-DOS and the Command Prompt]</ref><ref>[http://www.cyberciti.biz/faq/bash-shell-display-only-hidden-dot-files/ Bash Shell: Display All Hidden Dot Files In a Directory]</ref>. | ||
List only filenames and one file per line | |||
* {{Win}} {{kbd | key=dir/b}}<ref>[https://smallbusiness.chron.com/copy-list-files-windows-folder-excel-list-40032.html How to Copy a List of Files in a Windows Folder Into an Excel List]</ref> | |||
* {{Mac}} {{kbd | key=ls -1}}<ref>[https://www.baeldung.com/linux/list-one-filename-per-line List One Filename Per Line in Linux | Baeldung on Linux]</ref> | |||
Verify if a file or a directory exists | Verify if a file or a directory exists | ||