• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Terminal commands (MAC)

Page history last edited by Monica 10 years, 6 months ago Saved with comment


 

 

Common Commands

 

ls

list filenames or folders

-h human readable sizes

-l long listing (permissions, owners, size, and when last modified.)

cd

change directory

type cd and drag folder to terminal window

pwd

gives full path of current directory

mkdir

make directory

command creates a new folder(s) in the current working directory

create directory tree by using -p option

mv

move

move files or rename files

cp

copy

find

$ find . ~/ -iname "*.mp4"

 

to search only your user directory, type "~/"

search only for certain filetypes using a wildcard character (an asterisk, *)

-name is case-sensitive -iname is not

to search all sub directories, run command from top most folder and remove
"~/"

>>

send results to text file (*.txt)  using the >> notation. This will append data.

to replace data use single >

ls -R -1 -l To list all filesnames including subdirectories with additional data and output one entry per line

 

Rename files

use mv command

$ mv oldname newname

 

Detail guidelines for batch processing

 

NOTE: batch processing steps use the method of “piping” multiple commands directly in terminal screen. Alternative method is to use a shell script (*.sh). However, Mac Terminal allows copy/paste functionality. This makes things relatively easy to transfer multiple commands directly to the terminal window. Also shell scripts require special permissions.

 

 

Comments (0)

You don't have permission to comment on this page.