mv
and then type the location of the file you want to move, including the file name and the location where you want to move it to.cd ~/Documents
then and press Return to navigate to your Home folder.ls
then Return (you type Return after every command).ls
is the command for listing files.y
when you see a question asking if you want to see all the possibilities. To see more commands, press Return.man [name of command]
, where 'command' is the name of the command you want to find out more about. cd
command, followed by a directory path, like in Step 1 above, to specify the folder where you want a command to run. cd
and drag the Documents folder onto the Terminal window.mkdir 'TerminalTest'
cd ~/Documents/TerminalTest
then Return. Now type ls
and you should see 'TerminalTestFile' listed.cd~/Documents/Terminal Test
mv TerminalTestFile TerminalTestFile2.rtf
mv ~/Documents/TerminalTest TerminalTestFile.rtf ~/Documents/TerminalTest2 TerminalTestFile.rtf
ditto [folder 1] [folder 2]
where 'folder 1' is the folder that hosts the files and 'folder 2' is the folder you want to move them to.-v
after the command.cd ~/Downloads/
curl [URL of the file you want to download]
~/Downloads/
with the path to that folder, or drag it onto the Terminal window after typing the cd
command.defaults write com.apple.screencapture location
[path to the folder where you want screenshots to be saved]
killall SystemUIServer
defaults write com.apple.screencapture type JPG
killall SystemUIServer
cd ~/Documents
it to go to your Documents folder then delete the file. As it stands, that will delete the file without further intervention from you. -i
as in rm -i oldfile.rtf
rm -R oldfolder
and to confirm each file should be deleted, rm -iR oldfolder
tar
command to compress and uncompress files and folders. The usual file extension for a compressed tar archive is .tgz, although you might also see files ending with the .tar.gz extension. If the archive isn’t compressed, it usually just ends in .tar.tar
command in Terminal only if you specifically need to create a tar archive). See Compress or uncompress files and folders.tar
command, then press Return.z
flag indicates that the archive is being compressed, as well as being combined into one file. You’ll usually use this option, but you aren’t required to.v
flag:% tar -czvf LotsOfFiles.tgz LotsOfFiles
tar
command with the x
flag, then press Return. To see progress messages, also use the v
flag. For example: