commands Flashcards
(35 cards)
What does the command echo “HELLO -START OF EXECUTION OF LINUX/UNIX COMMANDS”
do?
Prints the message to the terminal.
Marks the start of the command execution session.
How does the command PS1=”\d \t \u@\h \#\$”
customize the shell prompt?
Displays current date, time, username, hostname, command number, and prompt symbol.
Provides a more informative prompt.
What is the purpose of the command pwd
?
Prints the current working directory.
What does the command ls
do?
Lists files and directories in the current directory.
What information does ls -la
provide?
Lists all files/directories with detailed information.
What does uname -r
display?
The Linux kernel version.
What is the output of uname -a
?
Shows all system information.
What does the command cat palindrome.c
do?
Displays the contents of the file palindrome.c
.
What is the purpose of the command cp sum_avgl.c sa_list.c
?
Copies sum_avgl.c
to a new file sa_list.c
.
What does the command mkdir sphal
accomplish?
Creates a directory named sphal
.
What does cd sphal
do?
Changes the current directory to sphal
.
What is the purpose of the command mv f2.c f4.c
?
Renames f2.c
to f4.c
.
What does the command rm f5.c
do?
Deletes the file f5.c
.
What does chmod 777 palindrome.c
grant?
Full permissions to all users for palindrome.c
.
What does the command cat sum_avgl.c key_search.c > progall.c
do?
Combines contents of two files into progall.c
.
What does more progall.c
accomplish?
Displays progall.c
page by page.
What is the function of the command wc progall.c
?
Counts lines, words, and characters in progall.c
.
What does the command find / -name passwd
do?
Searches the entire filesystem for files named passwd
.
What does grep “stdio” progall.c
search for?
Searches for the string ‘stdio’ in progall.c
.
What information does df -h
provide?
Displays disk space usage in human-readable format.
What does the command who
do?
Lists logged-in users.
What is the purpose of cat >> myteamlist
?
Appends team member details to myteamlist
.
What does sort myteamlist
accomplish?
Sorts myteamlist
alphabetically.
What does cat /proc/cpuinfo > infocpu
do?
Saves CPU information to infocpu
.