The “ q” command is ideal for exiting commands that run endlessly when executed, like the “top” command. This command will execute until your press “control + c” to go back to the command line interface or quit Terminal. A list of the top actively running apps using the CPU will display, including ports used, their state, memory per app, and more. The information will include CPU, memory, and disk utilization. The “ top” command will deliver your system’s stats inside the Terminal window. This command is irreversible once executed, all the directories and files inside the path you specify will be deleted straight away. The “ rm-R” command removes entire directories containing other directories or files. If, for example, you misnamed a folder, you can rename it using the “mv” command or delete it using the “ rmdir” command, including the path to the directory. The “ rmdir” command allows you to remove a directory created in error. This is ideal if you need to start a new project and use an existing one as the base. It will execute a copy of all the contents of one folder into a folder specified by you. Just like the English meaning of “ ditto,” this command can be used to do the same thing again. It will move the specified file from its original location to the new location.Įxample: “ mv path/to/new/file/location.” Copy Folder Contents to a New Folder The “ mv” command is for when you want to move a file instead of making a copy of it. The new directory will be added to the directory you’re working in, or you can specify the path location where you want it to go.Įxample: “ mkdir path/to/new/directory.” Move a File When you need another place to store new files, the “ mkdir” command creates a new directory (folder). Once your empty file is created, you can launch it in the text editor using the “open” command.Įxample: “ touch newfile.txt.” Create a Directory The “ touch” command creates a blank file of any file type. When stating the first value, include the original file you want to be copied, followed by a space and full path, filename, and extension of where you wish the new copy to be placed.Įxample: “ cp “. The “ cp” command lets you copy a file from one location to another or create a new copy of a file with a new name. By entering this command, a space, then the filename you want to access, you will launch the file using the appropriate application, like “Word,” for example. Use the “IS -I” command to find more file information, including the creation date, permissions, and owner. The “ Is” command can be used while viewing the files and directories of the current directory. This allows you to open a file, execute a command, and view the contents of a different directory. The “ cd” command will change the Terminal directory you’re working in. Terminal should then respond with any relevant information.īelow is a list of operational commands to get you started in Terminal and help grow your command prompt knowledge. You can execute commands in Terminal by entering the command, then hitting the return key.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |