{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Unix Commands Flashcards

To familiarize those with some basic Unix shell commands. Credit goes to http://freeengineer.org/learnUNIXin10minutes.html for the list of Unix command I made the flash cards from. (41 cards)

1
Q

ls

A

list directory contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cd

A

change directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

mkdir

A

make directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

cp [file1] [file2]

A

copys a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

mv [file1] [file2]

A

move or rename a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

/

A

root directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

/usr

A

usr directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

chmod 755 file

A

Changes the permissions of file to be rwx for the owner, and rx for the group and the world. (7 = rwx = 111 binary. 5 = r-x = 101 binary)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ls -a

A

List all files in current directory including hidden files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ls -l

A

list a directory in long ( detailed ) format

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

cat filename

A

Dump a file to the screen in ascii.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

echo $SHELL

A

Denotes what shell you are using.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

export PROJECTS=/usr/local/projects

A

Defines the environment variable PROJECTS with the value /usr/local/projects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

cd $PROJECTS

A

Changes your present working directory to the value of the environment variable PROJECTS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

echo $PROJECTS

A

Prints out the value of PROJECTS, or /usr/local/projects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

find . -name aaa.txt

A

Finds all the files named aaa.txt in the Current directory or any subdirectory tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

find / -name vimrc

A

Find all the files named ‘vimrc’ anywhere on the system.

18
Q

find search_path -name filename

19
Q

chown bruce file

A

Makes user bruce owner of file

20
Q

chown -R bruce dir

A

Makes user bruce owner of directory and everything in its directory tree.

21
Q

chgrp user file

A

Makes file belong to the group user.

22
Q

~

A

Home directory

23
Q

rm file1 [file2 …]

A

Remove or delete a file

24
Q

rm -r dir1 [dir2…]

A

recursivly remove a directory and its contents

25
rmdir dir1 [dir2...]
remove an empty directory
26
more filename
Progressively dump a file to the screen: ENTER = one line down, SPACEBAR = page down, q=quit
27
head filename
Show the first few lines of a file.
28
head -n filename
Show the first n lines of a file
29
tail filename
Show the last few lines of a file.
30
tail -n filename
Show the last n lines of a file. Show the last n lines of a file. Show the last n lines of a file.
31
ls -ld *
List all the file and directory names in the current directory using long format. Without the "d" option, ls would list the contents of any sub-directory of the current. With the "d" option, ls just lists them like regular files.
32
touch
Changes the date/time stamp of the file filename to the current time. Creates an empty file if the file does not exist. You can change the stamp to any date using
33
users
List users currently logged in
34
killall
Kill processes by name
35
ps
process status
36
tar
tape archive
37
tar xv
Extracts (x) files from the default tape drive while listing (v = verbose) the file names to the screen.
38
ping
Test a network connection
39
who
Print all usernames currently logged in
40
whoami
Print the current user id and name (`id -un')
41
wget
Retrieve web pages or files via HTTP, HTTPS or FTP