WorksheetsCommand Line Practice
Total questions: 20
Worksheet time: 10mins
Lists files and directories in long format, showing permissions, size, and date.
ls -l
dir -long
list -details
show -files
Moves or renames files or directories.
cp
mv
rm
ls
Moves up one directory level.
cd ..
cd /
cd .
cd ~
Terminates a process by its process ID (PID).
kill
terminate
end
stop
Removes a directory and its parent if empty.
rmdir -p
rm -r
delete
rmdir
Silent mode; suppresses output.
-s
--silent
-o
--quiet
Recursively removes a directory and its contents.
rm -r
rmdir
rm -f
delete
Displays the contents of a file with line numbers.
cat -n
cat
less
more
Quiet mode; suppresses warnings and errors.
-q
--quiet
-silent
-no-warn
Displays detailed information about files.
-l
-a
-h
-r
Inverts the match, showing lines that do not match the pattern.
-v
-i
-e
-c
Changes the owner and group of a file or directory.
chmod
chown
chgrp
mv
Moves or renames files, prompting before overwriting.
mv -i
cp -i
rm -i
mv
Creates a directory and any necessary parent directories.
mkdir -p
rmdir
touch
cp
Lists files and directories in the current directory.
ls
dir
list
show
Searches for a specific pattern in a file and displays matching lines.
grep
find
search
locate
Downloads files from the web.
curl
wget
ftp
scp
Tests connectivity to a specified host.
ping
connect
test
check
Displays help information for the command.
-h
--help
/help
?
Displays line numbers in output.
-n
-l
-a
-e
