1/35
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
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.
What command should be used to view text files?
cat is used to view text files in Linux.
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.
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.
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.
echo [-e][-n] [arg]
echo - prints arguments to stdout
[-e] - enables interpretation of backslash escapes[-n] - suppresses the trailing newline after output.
du [-h] [fileOrDir]
du - used to estimate and summarize disk usage of files and directories
[-h] - displays sizes in human readable format
What command is used to estimate and summarize disk usage of files in human readable format?
du -h
exit
Terminates the shell session.
file file
A command used to display the contents of a file or files in Linux.
What command is used to display the contents of a file called File?
file File
find dir [-name pattern]
A command used to search for files and directories in a specified directory that match a given pattern.
What command is used to search for files in a directory that match a given pattern?
find dir [-name pattern]
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.
What command should be used for searching for lines within a file matching a pattern?
grep [-c] [-v] [-e] pattern [file]
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.
What command is used to print the first x lines of a file?
head [-n num] [file]
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.
What command is used to terminate a process in linux?
kill [-signal | -s signal] pid
less [file]
less displays the contents of a file in the terminal
ln [-s] target [linkNameOrDir]
ln - creates a link to a directory
[-s] - creates a symbolic link
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.
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.
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.
rm [-f][-r]
rm deletes files or directories.
[-f] forces the removal without prompt,
[-r] allows recursive deletion of directories and their contents.
sleep n
Pauses for a specified duration in seconds, allowing for timed delays in scripts or commands.
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.
svn checkout
checkout downloads a working copy of a repo
svn log
displays the commit history of a Subversion repository, including details such as revision number, author, date, and commit message.
svn status
displays the status of files in a Subversion working copy, showing changes, untracked files, and files scheduled for addition or deletion.
tail [-n num][file]
tail outputs the last part of a file, allowing users to view the end contents directly in the terminal.
time command [args]
executes a command and displays the time taken to execute it, measuring real, user, and system CPU time.
touch fileOrDir
creates an empty file or updates the timestamp of an existing file or directory.
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.
which progname
returns the path of the executable file associated with the given command name.
Change owner permissions
Change group permissions
Change other permissions
chmod u+r
chmod g+r
chmod o+r