Press the up arrow to redisplay the command, and then move the cursor to the left to add -l. For example, ls -l /etc/periodic. There’s no need to retype the entire line.īy the same token, say you list the files in a directory and then decide you want to use the -l option to display a long list. I could easily press the up arrow to redisplay the command and then alter the command to copy one of the files to a different location. In the previous example, I copied pictures into my Users/Shared directory. Use the same trick to change a command’s arguments or options. For example, if you have several files in your Pictures directory, you can use the up arrow to redisplay the previous command, change the file name, and run the command again on a different file. You can use command editing to change commands and run them on different files. (You don’t need to move the cursor back to the end of the line.) A free program called m-cli bills itself a Swiss Army Knife for macOS, and it makes a lot of these hidden commands a lot easier to learn and discover. Use the left arrow to move the cursor to the location where you need to add the zero, type 0 and then press enter. You can do a lot with the macOS Terminal, but the commands tend to be obtuse. Using the command history, you can press the up arrow to display the command again. When you go to the directory and check, you see that there is indeed a file with a similar name, but you left out a zero. Terminal says the file doesn’t exist, but you’re sure it does.
0 Comments
Leave a Reply. |