Please write the Linux commands and run them.
h. What is the command or commands that would list the contents of the /var/log directory in alphanumeric order? List the command and its output.
i. What is the command or commands used to list the files in /var/log in order of their size? List the command and its output.
j. What is the command or commands used to list the top 10 file who use the most disk space? What is this command(s) and show its output?
k. What is the command that will show you the last 15 commands you have typed? List the command and its output.
l. What is the difference between the commands less and more?
h) list the contents of the /var/log directory in alphanumeric order:
ls /var/log | sort -f (sorts alphabetically)
i) list the files in /var/log in order of their size
ls -lS /var/log ( lists all files by size)
j) list the top 10 file who use the most disk space
du -a / | sort -n -r | head -n 10 (lists top 10 files with most disk space)
k) last 15 commands you have typed
fc -lrn -1 -15 (lists last 15 commands that we typed)
l) difference between the commands less and more
more : more is an old utility. When the text passed to it is too large to fit on one screen, it pages it. You can scroll down but not up.
ex: ls | more
less : less overcomes more's inability to scroll backwards through a file.
ex: ls | less
Please write the Linux commands and run them. h. What is the command or commands that...
Linux
j. What is the command or commands used to list the top 10 file who use the most disk space? What is this command(s) and show its output?
In Linux Please What is the command or commands that will show you the last 15 lines of the /var/log/kernel.log file? Please write the commands and copy the output.
LINUX: Question 1) There has been suspicious activity on the system. In order to preserve log information, it will be necessary to archive the current files in /var/logending with the ".log" extension. The files are to be saved to a file named log.tar, stored in the directory, ~/archive. It has also been requested that the files that were archived be saved to a directory, ~/backup. Objectives - Create an archive named log.tar that is stored in the archive directory located in the...
LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check the output) Display the command(s) used to do the following: create an empty file called history by using just a redirection operator. Verify and show. Show/verify all results (i.e., all commands and their corresponding outputs). Wait 1 minute or more and then display the command(s) used to do the following: change the timestamp on the history file you just created. Verify/display the change. Show/verify...
Using a Linux command-line interpreter, show the screenshots for executing the following commands: (1) display the current working directory, (2) list the contents of a directory, (3) change directory, (4) create a directory, (5) clear the screen, (6) copy a file from a directory into another directory, (7) delete a directory, (8) delete a file, (9) report information for a single process or set of processes, and (10) report a real-time statistics for current processes.
I need help with this. 10-21. Briefly describe the following Linux commands and acronyms. ssh: telnet: traceroute: TCP: LAN: DNS: ftp: ssh: ping: env: g++: gcc: 22. Show a command that will create a file named "etc.tar" in your home directory from recursively going through all of the files in the "/etc" directory. In other words, the "etc.tar" file will include the files in the "/etc" directory as well as all of its subdirectories. IMPORTANT: This command must work for...
2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what is its purpose? 3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Are there any entries that specify facilities, priorities, or log file locations? What does the last line of the file specify? Press q when finished to quit the...
2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what is its purpose? 3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Are there any entries that specify facilities, priorities, or log file locations? What does the last line of the file specify? Press q when finished to quit the...
Explain what the following UNIX command does: Is 'echo I.txt' Please type shell commands (for Windows. UNIX, or any other system that you like) for: creating a directory called hello world list the contents of this directory create a file called iwashere.txt display the contents of the file iwashere.txt from the command-line Please write a simple program in C for accepting a string from the command-line, reversing and printing the reversed string to standard output.
Linux/Fedora: Write the commands required for the following tasks. Try out each command on your system to ensure that it is correct: a. Make a hierarchical directory structure under /root that consists of one directory containing three subdirectories. b. Copy two files into each of the subdirectories. c. Create one more directory with three subdirectories beneath it and move files from the subdirectories containing them to the counterparts you just created. After you have completed these three steps at the...