Preview

File Processing Commands

Satisfactory Essays
Open Document
Open Document
354 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
File Processing Commands
• What UID and PID have the highest amount of physical memory a process has used and is not swapped out? Show all processes and full output.

top press f press d press p

You'll will find cpu usage in descending order for all processes.

• If using a long listing and no process modifiers, what is the swap space amount for the bash command?

top -p pidof_bash
After typing the above command press A (Capital a). You will see the below output.
1 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2021 xyz 20 0 XXXXX XXXX 1664 S 0 0.2 0:00.43 bash
2 PID PPID TIME+ %CPU %MEM PR NI S VIRT SWAP RES UID COMMAND
2021 2019 0:00.43 0 0.2 20 0 S 22132 16m 4952 1000 bash
3 PID %MEM VIRT SWAP RES CODE DATA SHR nFLT nDRT S PR NI %CPU COMMAND
2021 0.2 22132 16m 4952 XXX XXXX X664 1 0 S 20 0 0 bash
4 PID PPID UID USER RUSER TTY TIME+ %CPU %MEM S COMMAND
2021 2019 1000 xyz xyz pts/0 0:00.43 0 0.2 S bash

Above you can see the swap space.
You can also try top -p pidofbash press f press p press enter

You'll see the swap space too.

• When using top command, what command would you use to kill a process?

Press k to kill a process

• If you were not using top command, what command would you use to kill a process?

kill processid killall processname

• What command would you use to manually mount the standard CD-ROM device /dev/db1 at /media/disk?

mount /dev/db1 /media/disk

• What command would you use to display the amount of available disk space on /dev/db1 in a human readable form?

df -h /dev/db1

• Type in the command grep - - help to access the help manual. Using this information and the information from the text, how would you write a command to find the pattern 111 in a file called myfile.txt?

grep -irna "111"

You May Also Find These Documents Helpful

  • Good Essays

    Nt1310 Unit 4 Lab Report

    • 818 Words
    • 4 Pages

    Step 11: To set the showmode option, type in, “:set showmode” into the vi editor while in command…

    • 818 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    SD1230 Lab 1

    • 239 Words
    • 2 Pages

    1. Rank the areas of memory from highest speed to lowest? – Processors registers, Processors cache and RAM and hard drives.…

    • 239 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 3

    • 3151 Words
    • 13 Pages

    while talking to the disk controller.Usually S = S', C' = C/N and H' = H*N,…

    • 3151 Words
    • 13 Pages
    Good Essays
  • Good Essays

    To kill a process you could type kill 101. The '101' would be the pid (process ID) number. If the process gets hung and doesn’t listen to this kill command, you can also type kill -9 101. The -9 pulls the plug, this command is not recommended because it can leave some locked files or child processes behind. Kill -l provides a quick look at available signals, names and pid's…

    • 567 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Nt1310 Unit 1 Study Guide

    • 846 Words
    • 4 Pages

    4. Using Vista, what type of command prompt window is needed to run the Chkdsk command?…

    • 846 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    You use the grep command to search for a specified pattern in a file, such as a particular word or phrase.…

    • 604 Words
    • 3 Pages
    Satisfactory Essays
  • Better Essays

    #include #include float avg_wt,avg_tt; int i = 0,ttl_wt=0,ttl_tt=0,qt; struct process { int prn; char type; int bt; int wt; int tt; struct process *nxt; }*stfor,*stbck,*np,*endfor,*endbck,*temp; void ins_node(struct process *np) { if(np->type == 'f') { if(stfor == NULL) stfor = endfor = np; else { endfor->nxt = np;…

    • 401 Words
    • 2 Pages
    Better Essays
  • Satisfactory Essays

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 22 root 20 0 0 0 0 S 0.7 0.0 4:11.36 ata/0 212 root 20 0 0 0 0 S 0.7 0.0 2:09.14 scsi_eh_1 3249 student 20 0 80492 37m 6152 S 0.3 7.6 0:01.23 nxagent 3276 nx 20 0 3172 528 456 S 0.3 0.1 0:00.05 nc 3486 student 20 0 49496 11m 9444 S 0.3 2.3 0:00.13 gnome-terminal 3504 student 20 0 2672 1140 880 R 0.3 0.2 0:00.04 top 1 root 20 0 2852 1376 1180 S 0.0 0.3 0:00.88 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0…

    • 385 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Ans: This matches a file with 4 characters, first is a number from 0 to 9, second is a lower case letter from a-z, third is a number from 0-9, and fourth is upper case letter from A-Z.…

    • 529 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Linux Assignment 3

    • 1307 Words
    • 6 Pages

    PID process identification numbers. Each of these numbers identifies the command running in the background. You can use the PS (process status) utility to display the PID numbers of running commands.…

    • 1307 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    final exam

    • 1020 Words
    • 5 Pages

    TCO (2) In DOS, you use the ____ command to create a partition, and the format command to prepare the partition for use.…

    • 1020 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Operating System

    • 1099 Words
    • 5 Pages

    Answer: d. It is necessary to specify two files when you use the comm command.…

    • 1099 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    **Collection**Any and all investigating officers should keep this in mind as well as have a warrant baring the proper wording and language that adheres to search and seizure of a personal computer in order to avoid violating any privacy rights. First the officer should check to see if the computer is on or off. If an officer finds that the computer is not on, he or she should not turn it on the evidence must not be altered; however if the officer finds the computer on then the officer should photograph the screen even if the screen is in sleep mode. Once the computer is photographed the power should be disconnected. In other words the modem should be drained of power by unplugging it. Next the officer should be sure to insert a police disc into the CD or DVD drive; bear in mind the disc should be blank and after inserting it the drive should be sealed. All other hardware connected to the system should be photographed in order to have a record of how the system was…

    • 1674 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Girls Just Wanna Have Fangs, written by Sady Doyle, is a harsh criticism of Stephanie Meyers writing style in the Twilight series as well as praise for women and their ability to launch products into global success. Finding someone to argue that the Twilight series is a well written, sophisticated and exceptional could be an elongated task. However, finding “shrieking” Twilight fans is not. Most people won’t argue that the Twilight books are an especially innovative series of books, because they are loaded with very publicized faults. The flaws of the series range from old-fashioned gender roles to a rather unimaginative plot. Even sometimes including unintentional humor in her work, making the series look naive and empty-headed.…

    • 485 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Stata Manual

    • 1514 Words
    • 7 Pages

    directly assessed by clicking on help. Alternatively, you can enter help in the command window. On…

    • 1514 Words
    • 7 Pages
    Good Essays

Related Topics