basic commands Flashcards

1
Q

echo

A

print screen(-n = do not print)

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

pwd

A

show location

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

what is the anatomy of a command

A

[command][arguments…]

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

tar

A

an archival command that can archive, compress, and extract files, but to make it work, you need to tell it which files to take action on, and what exactly to do with those files

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

tar -c -z -f

A

create zip file(flags)

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

[man][command]

A

show the manual of a certain command

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

cd

A

change current directory

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

ls

A

see what’s in a directory

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

cd ~

A

go to home directory

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

mkdir

A

make a directory in current location

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

[touch][filename.example]

A

create a new file

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

mv

A
move or rename a file. example:
[mv][filename][newname]
[mv][source][destination]
[mv][filename][location]
[mv][subfolder/file][newname](will rename file and move it to current folder)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

rm

A

remove a file

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

rm -r

A

remove a folder and all its contents

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

cat

A

print out all the contents of a file

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

head

A

print the first few lines of a file

17
Q

tail

A

print the last few lines of a file

18
Q

more

A

print out the contents of a file, but only fill one screen’s worth at a time

19
Q

less

A

The less command allows you to go forward one line with the down arrow, backward one line with the up arrow, and backward and forward a page with the page up and page down keys. You can also use the space bar in the same way you can with the more command

20
Q

/

A

root directory

21
Q

.

A

current directory

22
Q

..

A

one level up

23
Q

../..

A

two levels up

24
Q

*

A

The “splat” or “glob” operator. This is the wildcard of the command line and represents “any characters”

25
Q

cp

A

Copy one or more files to a new location

26
Q

touch

A

Create a new file or update modification time if a file with that name exists

27
Q

mkdir -p

A

create a nest of directories

28
Q

which

A

To figure out a default executable’s location

29
Q

env

A

You can see exactly what variables have been set,

30
Q

ls -a

A

show hidden files

31
Q

$PATH

A

show the path to a file