UNIX COMMANDS Flashcards

1
Q

cp -r arg1 arg2

A

copy content of arg1 directory to the arg2 directory.

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

man command

A

will print the manual for using a specific command.

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

cd

A

change directory.

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

cd /

A

go to root directory.

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

cd ~

A

go to home directory.

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

cd ..

A

navigate one directory up.

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

cd ./arg1/arg2

A

navigate into arg2 directory which is inside arg1 directory.

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

ls

A

allows us to see the contents of the current directory.

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

ls -a

A

allows you to see hidden items in a directory.

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

ls arg1

A

allows us to see the contents in the arg1 directory.

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

mkdir

A

allows us to create a new directory.

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

pwd

A

prints the directory you’re currently working in.

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

echo

A

command that will print a string or the result of a command to the console.

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

touch

A

creates a file but also allows you to modify the timestamp of a file. (Usually used to create empty files).

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

cat > filename

A

creates a new file

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

cat filename

A

Displays the file content

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

mv file “new file path”

A

moves the files to the new location

18
Q

mv filename new_file_name

A

Renames the file to a new filename.

19
Q

rm filename

A

Deletes a file.

20
Q

clear

A

clears the terminal

21
Q

rmdir

A

Deletes a directory.

22
Q

mkdir directoryname

A

creates a new directory in the present working directory or at the specified path.

23
Q

grep

A

prints any lines in a file or files that match a given pattern.

24
Q

rm

A

will remove a file.

25
ln
creates a link between files. Allow you to make a shortcut to a file.
26
wc
will print the number of words in a file.
27
rm -r arg1
removes arg1 directory.
28
chmod
change permissions on a file
29
chmod 754 hello.txt does what?
owner has read, write, and execute. groups have read and execute. others have read.
30
31
$USER
Gives current user's name.
32
$PATH
Gives search path for commands.
33
$PWD
Gives the path of present working directory.
34
$HOME
Gives path of home directory.
35
$HOSTNAME
Gives name of the host.
36
$LANG
Gives the default system language.
37
$EDITOR
Gives default file editor.
38
$UID
Gives uer ID of current user.
39
$SHELL
Gives location of current user's shell program.
40
What is Amazon EC2?
A virual computing environment.