chsh -s /bin/bash |
change terminal to bash |
chsh -s /usr/bin/zsh |
change terminal to zsh |
echo $0 |
see type of shell running |
bash --version |
bash version running |
curl -O www.me.com |
downloads file from Link |
dscl . list /dir/location/path | grep -v "^_" |
list all users on this Mac |
sudo chown -R username /dir/location/path |
change all permissions recursively |
find . -name 'mystring*' |
find a file |
find /dir/location/path -type d -name "99966" -print |
find a directory :-type d means "Directory" |
grep -lr "text to find" /dir/location/path |
find string in file |
ps aux | grep node |
find all node process running |
source ~/.bash_profile |
save bash changes |
top |
shows all running programes CPU cycle |
ps -acx |
find all programs running on Machine |
ps -A |
Show all process running |
ps -ax | head -20 |
a: option shows process for all users x: shows process not connected with a Terminal |
ps kill 1234 |
number used to kill application running |
cd |
go to directory or return to home director if you /file/file/ is listed |
ls -a |
show all files in directory |
cd ~ or cd /dir/location/path |
go to home directory |
open filename.css |
open a file |
open . |
opens dictory in finder |
cp |
copy file |
mv filename dir-name |
move file into a directory |
mv oldname newname |
rename a file |
rm |
delete file (does not go to trash, just goes away for ever) |
pwd |
shows what directory your in |
man ls |
shows documentation for command must us q to escape command |
sw_vers -productVersion |
shows product version running |
mkdir /dir/location/path |
Makes a directory |
touch new_file.html |
create a new file |
xattr -rc "/path/to/directory" |
To recursively remove extended attributes on all files in a directory |
du -sh / | du -sh /path/to/dir// |
Show all the directories in current folder |
chmod +x myfile |
make file executible |
chmod +r myfile |
make file readable |
chmod +w myfile |
make file writable |
chmod g+w myfile |
give group write permission to "myfile", leaving all other permission flags alone |
chmod g-rw myfile |
remove read and write access to "myfile", leaving all other permission flags alone |
chmod g+rwxs /dir/location/path |
give full group read/write access to directory "mydir", also setting the set-groupID flag so that directories created inside it inherit the group |
chmod u=rw,go= privatefile |
explicitly give user read/write access, and revoke all group and other access, to file 'privatefile' |
chmod -R g+rw |
give group read write access to this directory, and everything inside of it (-R = recursive) |
chgrp -R medi . |
change the ownership of this directory to group 'medi' and everything inside of it (-R = recursive). The person issuing this command must own all the files or it will fail. |
ipconfig getifaddr en0 |
local address on ethernet |
ipconfig getifaddr en1 |
local address on wifi |
ifconfig |
local address |
netstat -i |
ip addresses assigned to interfaces |
netstat |
ip addresses http://pcsupport.about.com/od/commandlinereference/p/netstat-command.htm |
delete all trash |
sudo rm -rf ~/.Trash/* |
ln -s | ln -s /dir/location/path ~/SymlinkDirectory |
Create a symlink command takes target location “/Usr/Directory/Destination/” and creates the link file inside of “~/SymlinkDirectory” |