![]() The nano command can also be used to open and edit files, however nano is more of a terminal editor than cat with extra functionality such as going to specific line: cat an-existing-file.txt > another-existing-file.txt - Append the contents of one file to another file.cat > a-new-file.txt - Create a new file and begin writing to it in terminal.cat an-existing-file.txt another-existing-file.txt - View contents of both files in terminal.cat an-existing-file.txt - View contents of file in terminal.The cat command can be used to open and edit files: This is useful to get around quickly without having to type the whole file or directory name. cd and TAB - The tab key can be used to autocomplete a file or directory in the current directory.cd ~/ - Go to the “home” directory which contains useful settings and files such as SSH keys and ZSH settings (more on that later).cd some-folder - Change directory to another location if location exists.pwd - Prints the current, full, absolute directory on screen. ![]() ls -al - List a directory contents containing hidden folders and more file/directory metadata.The post covers basic CLI commands which most people will use on a daily basis, plus some extras which I don’t use too often but are invaluable at the right time. This post is a collection of commands or tools which make using the CLI a better experience. As developers we spend a lot of time hacking away in the command line, whether it’s embedded in VS Code, a separate app like iTerm, or the good old standard Mac Terminal. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |