Section 1

Preview this deck

sudo

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (51)

Section 1

(50 cards)

sudo

Front

the ability to become a superuser for a single command line operation

Back

show databases; (when logged in)

Front

show databases

Back

xargs

Front

execute arguments

Back

exit

Front

exit the shell

Back

cp - cp iamcool.txt neat.txt - cp awesome.txt otherdir/ - cp -r dirname newdirname

Front

copy a file / directory from one location to another - within the same dir - to a different dir (/ makes sure it is really a directory: if the directory doesn't exist I'll get an error - copy a dir to a newly created dir with files in it

Back

open .

Front

open current directory in Finder

Back

select * from [tablename]

Front

show records

Back

apropos

Front

find what man page is appropriate

Back

mysql

Front

check msql version on built-in server

Back

mysql -uroot -ppassword [password?];

Front

log in mysql as root user, seting/using a password

Back

ls - ls -a - ls -l - ls -R - ls -l -R - OR RATHER: ls -lR - ls -las

Front

list directory - list invisible files - list directory + details - recursively lists subdirectories - combining some of the above - longlist all: invisible files too, showing sizes in blocks

Back

mv - mv filename newfilename - mv olddir newdir - mv filename destdir - mv -i filename newfilename - mv -n filename newfilename

Front

move a file or directory from one location to another - renaming a file - rename a dir and keep content - move a file to a new location - force mv prompts before overwriting an existing file - make mv not overwrite an existing file

Back

pushd

Front

push directory: to save your current location and go to a new location - pushd (with no arguments): to switch between your current dir and the last one you pushed

Back

cd downloads > ls

Front

go to downloads folder and list contents

Back

ln

Front

see: https://www.computerhope.com/unix/uln.htm

Back

drop table [tablename];

Front

drop table

Back

cat filename - cat filename anotherfile

Front

print the whole file - prints both files

Back

export

Front

export/set a new environment variable

Back

chown

Front

changes ownership of files and directories

Back

touch newfile.txt (Unix) New-Item newfile.txt (Windows)

Front

to make an empty file

Back

man

Front

read a manual page

Back

find

Front

find files

Back

unzip -a [filename]

Front

to unzip a file

Back

create table [tablename] (id integer PRIMARY KEY AUTO_INCREMENT, columnname datatype NOT NULL, columnname datatype NOT NULL);

Front

create table

Back

create database [dbname]; (when logged in)

Front

create a database

Back

show tables;

Front

show tables of chosen db

Back

describe [tablename];

Front

see table

Back

open ~/Desktop/merge.txt open -a "Sublime Text" ~/Desktop/merge.txt

Front

- open a file - open a file in a specified application

Back

less

Front

page through a file: view (but not change) the contents of a text file on screen - use the arrow key to page up/down

Back

vagrant ssh Ctrl + D

Front

SSH into Vagrant SSH out of Vagrant

Back

mysql -uroot;

Front

log in mysql as root user

Back

cd / cd Volumes cd ls -la

Front

list all hard drives

Back

type -a [progname]

Front

find various versions of a prog in your PATH

Back

hostname

Front

my computer's network name

Back

use [dbname]; (when logged in)

Front

choose the db you want to work with

Back

SOURCING: - source filename [arguments] - . filename [arguments]

Front

- used to load any functions file into the current shell script or a command prompt / executes the content of the file passed as argument, in the current shell

Back

cd - cd ~ OR: cd (without directory name) - cd / - cd .. - cd - - cd . - cd temp/stuff/things/orange/apple/pear/grape/

Front

change directory - back home - go to root level of your startup disk - go to the directory above the one you're currently in - go back to the directory you were in before the last time you issued the cd command - current directory - using a path

Back

mkdir directoryname mkdir -p temp/stuff/things/etc mkdir "directory name"

Front

make directory - with a path - with a space in the name

Back

popd

Front

pop directory: to return to the saved (using pushd) location

Back

insert into [tablename] (colname, colname) values('string or whatever', false);

Front

insert a new record/row

Back

echo

Front

print some arguments

Back

chmod

Front

change the permissions of files or directories

Back

ctrl+D

Front

exit out of MySQL

Back

brew search mysql

Front

check mysql with Homebrew

Back

pwd

Front

print working directory

Back

vim [filename] see more: https://github.com/yuanqing/vim-basics/blob/master/README.md

Front

open file in Vim

Back

man hier

Front

get an overview of aliased directories inside /private, eg. /etc; /var

Back

grep

Front

find things inside files

Back

go to dir above the one you want to remove, then: - rmdir dirname - rm -rf dirname - rm filename

Front

- remove directory - when OSX refuses to remove dir saying it's not empty (there's a hidden .DS_Store file in it) - remove file

Back

env

Front

look at your environment

Back

Section 2

(1 card)

cmd + K

Front

clear console (also works on Ffox/Chrome devtools)

Back