File Commands Flashcards

1
Q

ls

A

List

List files in a directory

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

ls -R

A

List all files in the subdirectory

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

ls -a

A

List all hidden files

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

cat

A

List the contents of a file

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

cat > filename

A

Creates a new file

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

diff

A

Compare the contents of two files line by line

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

tar

A

Extract, compress, and archive multiple files in linux

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

tar xf [yourfile_file.tar]

A

Extract file

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

tar czf

A

Creates a gzip compressed tar file

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

tar cf

A

Create an archive file from a file

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

gzip

A

Compress a file with the .gz extension

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

chmod

A

Change the read write and execute permissions of files and directories

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

chown

A

Change or transfer file ownership

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

rm

A

Remove a file

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

rm -r

A

Remove a directory recursively

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

wc

A

Print the number of words, lines, and bytes in a file

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

cp

A

Copy files from the current directory to a different directory

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

wget

A

Download files from the internet

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

cp -r

A

Recursively copy the contents of the first file to the second file

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

mv

A

To move or rename files

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

ln -s

A

Create a symbolic link

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

touch

A

Create a new file

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

More “file name”

A

Shows the contents of a file

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

head “filename”

A

Show the first ten lines of a file

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

tail “filename “

A

Show the last ten lines of a file

26
Q

gpg -c

A

Encrypt a file

27
Q

gpg

A

Decrypt a file

28
Q

sudo

A

Perform task that need administrative or root permissions

29
Q

locate

A

To search for a file or directory

30
Q

find

A

To locate files within a directory

31
Q

jobs

A

Displays current jobs

32
Q

kill

A

Terminate an unresponsive program

33
Q

killall

A

Terminates all running programs and processes except the one conducting the kill command

34
Q

history

A

See the commands that you’ve entered before

35
Q

man

A

Show manual instructions on Linux commands

36
Q

zip

A

Compress files into a zip archive

37
Q

unzip

A

Extract zipped files from a zip archive

38
Q

top

A

Monitor system resource usage

39
Q

ps

A

Show a snapshot of active processe

40
Q

echo

A

Move data into a file

41
Q

hostname

A

Know the name of your host/network

42
Q

ping

A

Check connectivity to a server

43
Q

ifconfig

A

Show IP addresses of all network interfaces

44
Q

netstat

A

Show status of network

45
Q

whois

A

Show more information about domain

46
Q

dig

A

Show DNS info about a domain

47
Q

host

A

Do an IP lookup for a domain

48
Q

grep

A

Search for matching patterns in a file

49
Q

Clear

A

Clear the terminal display

50
Q

less

A

Command to read contents of a file one page at a time

51
Q

sort

A

Arranges the contents of a file in a particular order

52
Q

service

A

Start stop or restart a service or daemon by calling a script

53
Q

mount

A

Mount file systems in linux

54
Q

traceroute

A

Trace all hops the network too to reach the destination

55
Q

ufw

A

Firewall command

56
Q

Apt pacman yum rpm

A

Package managers depending on the distro

57
Q

cal

A

Command line calendar

58
Q

Whereis

A

Locate the binary source and manual pages for a command

59
Q

whatis

A

Find what a command is used for

60
Q

alias

A

Create a shortcut for regularly used commands