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
tail “filename “
Show the last ten lines of a file
26
gpg -c
Encrypt a file
27
gpg
Decrypt a file
28
sudo
Perform task that need administrative or root permissions
29
locate
To search for a file or directory
30
find
To locate files within a directory
31
jobs
Displays current jobs
32
kill
Terminate an unresponsive program
33
killall
Terminates all running programs and processes except the one conducting the kill command
34
history
See the commands that you’ve entered before
35
man
Show manual instructions on Linux commands
36
zip
Compress files into a zip archive
37
unzip
Extract zipped files from a zip archive
38
top
Monitor system resource usage
39
ps
Show a snapshot of active processe
40
echo
Move data into a file
41
hostname
Know the name of your host/network
42
ping
Check connectivity to a server
43
ifconfig
Show IP addresses of all network interfaces
44
netstat
Show status of network
45
whois
Show more information about domain
46
dig
Show DNS info about a domain
47
host
Do an IP lookup for a domain
48
grep
Search for matching patterns in a file
49
Clear
Clear the terminal display
50
less
Command to read contents of a file one page at a time
51
sort
Arranges the contents of a file in a particular order
52
service
Start stop or restart a service or daemon by calling a script
53
mount
Mount file systems in linux
54
traceroute
Trace all hops the network too to reach the destination
55
ufw
Firewall command
56
Apt pacman yum rpm
Package managers depending on the distro
57
cal
Command line calendar
58
Whereis
Locate the binary source and manual pages for a command
59
whatis
Find what a command is used for
60
alias
Create a shortcut for regularly used commands