Linux Commands: File Processing, Archiving, and User Management

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/31

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering Linux command-line tools for file viewing, text processing, archiving, compression, and user/group permission management.

32 Terms

1
New cards

cat filename

Print the entire contents of a file to the screen.

2
New cards

less filename

View a file one page at a time (press q to quit).

3
New cards

head -n 10 filename

Show the first 10 lines of a file.

4
New cards

tail -n 20 filename

Show the last 20 lines of a file.

5
New cards

grep pattern filename

Search for text inside a file.

6
New cards

grep -i pattern filename

Case-insensitive text search.

7
New cards

grep '^error' filename

Match lines that start with the word error.

8
New cards

grep 'error$' filename

Match lines that end with the word error.

9
New cards

wc -l filename

Count the number of lines in a file.

10
New cards

sort filename

Sort lines alphabetically.

11
New cards

uniq

Remove duplicate adjacent lines.

12
New cards

cut -d: -f1 /etc/passwd

Extract the first column using a colon as the delimiter.

13
New cards

tar czvf archive.tar.gz folder

Create a gzip-compressed archive verbosely.

14
New cards

tar xzvf archive.tar.gz

Extract a gzip-compressed archive verbosely.

15
New cards

tar cjvf archive.tar.bz2 folder

Create a bzip2-compressed archive.

16
New cards

gzip filename

Compress a file into a .gz file.

17
New cards

gunzip filename.gz

Decompress a .gz file.

18
New cards

zip archive.zip file1 file2

Create a .zip archive.

19
New cards

unzip archive.zip

Extract a .zip archive.

20
New cards

whoami

Print your current username.

21
New cards

id

Print your user ID (UID) and group IDs (GID).

22
New cards

who

List currently logged-in users.

23
New cards

su - username

Switch to another user account.

24
New cards

sudo command

Run a command with root privileges.

25
New cards

useradd username

Create a new user account.

26
New cards

usermod

Modify an existing user account.

27
New cards

userdel username

Delete a user account.

28
New cards

groupadd groupname

Create a new group.

29
New cards

passwd username

Set or change a user password.

30
New cards

chmod 755 filename

Change file permissions (4 is read, 2 is write, 1 is execute).

31
New cards

chown user:group filename

Change the owner and group of a file.

32
New cards

chgrp groupname filename

Change the group ownership of a file.