CSSE2310 Linux Commands

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

1/35

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:57 PM on 6/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

36 Terms

1
New cards

cat [-n] [file]

cat - concatenates and displays file content to the standard output.

The -n option numbers the output lines, allowing for easier reference.

This command is commonly used for viewing text files or combining multiple files.

2
New cards

What command should be used to view text files?

cat is used to view text files in Linux.

3
New cards

chmod mode fileOrDir

chmod - changes the permissions of a file or directory in a Linux system.

mode - specifies the permission settings (read, write, execute) for user, group, and others.

This command modifies who can access and modify the specified file or directory.

4
New cards

What command is used to change permissions of a file?

chmod is the command used to change the permissions of a file or directory in a Linux system.

5
New cards

cp source dest

cp is a command used to copy files and directories from a source to a destination in a Linux system. The source specifies the file or directory to be copied, while dest defines the location where the copy will be created.

6
New cards

echo [-e][-n] [arg]

echo - prints arguments to stdout

[-e] - enables interpretation of backslash escapes
[-n] - suppresses the trailing newline after output.

7
New cards

du [-h] [fileOrDir]

du - used to estimate and summarize disk usage of files and directories

[-h] - displays sizes in human readable format

8
New cards

What command is used to estimate and summarize disk usage of files in human readable format?

du -h

9
New cards

exit

Terminates the shell session.

10
New cards

file file

A command used to display the contents of a file or files in Linux.

11
New cards

What command is used to display the contents of a file called File?

file File

12
New cards

find dir [-name pattern]

A command used to search for files and directories in a specified directory that match a given pattern.

13
New cards

What command is used to search for files in a directory that match a given pattern?

find dir [-name pattern]

14
New cards

grep [-c] [-v] [-e] pattern [file]

grep - A command used to search and filter text within files based on specified patterns.

[-c] - Count the number of lines that match the pattern. [-v] - Invert the match, displaying lines that do not match the pattern. [-e] - Specify the pattern to match against the input.

15
New cards

What command should be used for searching for lines within a file matching a pattern?

grep [-c] [-v] [-e] pattern [file]

16
New cards

head [-n num] [file]

A command that outputs the first few lines of a file, with the number of lines specified by [-n num]. If no number is given, the default is usually 10 lines.

17
New cards

What command is used to print the first x lines of a file?

head [-n num] [file]

18
New cards

kill [-signal | -s signal] pid

The kill command is used to terminate processes in Linux. It sends a specified signal to the process identified by its PID (process ID), with options for different signal types.

19
New cards

What command is used to terminate a process in linux?

kill [-signal | -s signal] pid

20
New cards

less [file]

less displays the contents of a file in the terminal

21
New cards

ln [-s] target [linkNameOrDir]

ln - creates a link to a directory

[-s] - creates a symbolic link

22
New cards

ls [-a] [-d] [-i] [-l] [fileOrDir]

ls - lists contents of a directory

[-a] shows all files including hidden ones,

[-d] lists directories themselves,

[-i] shows index numbers,

[-l] gives a detailed listing.

23
New cards

man [-k] [section] page

man displays the manual pages for a command, providing detailed documentation on usage and options.

[-k] searches the manual page descriptions,

[section] specifies the section of the manual to view.

24
New cards

ps [-e] [-f] [-T] [-U user]

ps displays information about active processes.

[-e] shows all processes,

[-f] provides a full-format listing,

[-T] shows threads,

[-U user] filters processes by the specified user.

25
New cards

rm [-f][-r]

rm deletes files or directories.

[-f] forces the removal without prompt,

[-r] allows recursive deletion of directories and their contents.

26
New cards

sleep n

Pauses for a specified duration in seconds, allowing for timed delays in scripts or commands.

27
New cards

sort [-r][-n] file

sort arranges the lines of text files in a specified order.

[-r] sorts in reverse order, and

[-n] sorts numerically instead of alphabetically.

28
New cards

svn checkout

checkout downloads a working copy of a repo

29
New cards

svn log

displays the commit history of a Subversion repository, including details such as revision number, author, date, and commit message.

30
New cards

svn status

displays the status of files in a Subversion working copy, showing changes, untracked files, and files scheduled for addition or deletion.

31
New cards

tail [-n num][file]

tail outputs the last part of a file, allowing users to view the end contents directly in the terminal.

32
New cards

time command [args]

executes a command and displays the time taken to execute it, measuring real, user, and system CPU time.

33
New cards

touch fileOrDir

creates an empty file or updates the timestamp of an existing file or directory.

34
New cards

wc [-c][-l] [file]

wc counts the number of words in a file

[-c]counts the bytes in the file.

[-l] counts the lines in the file.

35
New cards

which progname

returns the path of the executable file associated with the given command name.

36
New cards

Change owner permissions

Change group permissions

Change other permissions

chmod u+r

chmod g+r

chmod o+r