[Linux Command Explanation Encyclopedia] 033.atrm, colrm and hdparm of common Linux commands

atrm

Delete the specified task in the pending task queue

Supplementary Note

atrmThe command is used to delete the specified task in the pending task queue.

grammar

atrm [选项] [参数]

options

  • -V: Display the version number.

parameter

  • Task number: Specify the task to be deleted in the queue to be executed.

example

delete queued tasks

atq        # 显示当前已经设置的任务
2 Mon May 17 08:00:00 2010 a root
1 Sat May 15 17:00:00 2010 a root

atrm 2     # 删除任务2 

colrm

Delete the specified column in the file

Supplementary Note

colrmcommand is used to delete the specified column in the file. colrmA command reads input from standard input and outputs it to standard output. If no parameters are given, colrmthe command will not filter any lines.

grammar

colrm [参数]

parameter

  • Starting column number: specify the starting column to be deleted;
  • Ending Column Number: Specifies the ending column to delete.

hdparm

Display and set hard disk parameters

Supplementary Note

hdparmThe command provides a command line interface for reading and setting IDE or SCSI hard disk parameters.

grammar

hdparm [选项] [参数]

options

  • -a<缓存分区>: Set the number of partitions pre-stored in the buffer when reading files. If no <缓存分区>option is added, the current setting is displayed.
  • -A<0或1>: Enable or disable caching when reading files.
  • -c<I/O模式>: Set IDE 32-bit I/O mode.
  • -C: Detect the power management mode of the IDE hard disk.
  • -d<0或1>: Set the DMA mode of the disk.
  • -f: Write the data in the memory buffer to the hard disk and clear the buffer.
  • -g: Display parameters such as tracks, heads, and sectors of the hard disk.
  • -h: Display help.
  • -i: Display the hardware specification information of the hard disk, which is provided by the hard disk itself when booting.
  • -I: Directly read the hardware specification information provided by the hard disk.
  • -k<0或1>: When resetting the hard disk, keep -dmuthe parameter setting.
  • -K<0或1>: When resetting the hard disk, keep -APSWXZthe parameter setting.
  • -m<扇区数>: Set the number of partitions for multi-partition access on the hard disk.
  • -n<0或1>: Ignore errors that occur during hard disk writing.
  • -p<PIO模式>: Set the PIO mode of the hard disk.
  • -P<分区数>: Set the number of partitions in the internal cache of the hard disk.
  • -q: Do not display any information on the screen when executing subsequent parameters.
  • -r<0或1>: Set the read/write mode of the hard disk.
  • -S<时间>: Set the waiting time before the hard disk enters power saving mode.
  • -t: Evaluate the read efficiency of the hard disk.
  • -T: Evaluate the read efficiency of hard disk cache.
  • -u<0或1>: When accessing the hard disk, other interrupt requests are allowed to be executed at the same time.
  • -v: Display the relevant settings of the hard disk.
  • -w<0或1>: Set the write cache of the hard disk.
  • -X<传输模式>: Set the transfer mode of the hard disk.
  • -y: Make the IDE hard disk enter the power saving mode.
  • -Y: Put the IDE hard disk into sleep mode.
  • -Z: Turn off the automatic power saving function of some Seagate hard drives.

parameter

  • Device file: Specify the device file name corresponding to the id driver.

example

Display the relevant settings of the hard disk:

hdparm /dev/sda
/dev/sda:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19457[柱面数]/255[磁头数]/63[扇区数], sectors = 312581808[总扇区数], start = 0[起始扇区数]

Display the number of cylinders, heads, and sectors of the hard disk:

hdparm -g /dev/sda
/dev/sda:
geometry = 19457[柱面数]/255[磁头数]/63[扇区数], sectors = 312581808[总扇区数], start = 0[起始扇区数]

Test the read speed of the hard disk:

hdparm -T /dev/sda
/dev/sda:
 Timing cached reads:   4684 MB in  2.00 seconds = 2342.92 MB/sec

Test the read speed of hard disk cache:

hdparm -T /dev/xvda
/dev/xvda:
Timing cached reads: 11154 MB in 1.98 seconds = 5633.44 MB/sec

Detect the power management mode of the hard disk:

hdparm -C /dev/sda
/dev/sda:
drive state is: standby [省电模式]

Query and set the number of sectors accessed by multiple sectors of the hard disk to improve the access efficiency of the hard disk:

hdparm -m /dev/sda
hdparm -m    # 参数值为整数值如8 /dev/sda

Attachment: Hard Disk Bad Sector Repair Method

Check: smartctl -l selftest /dev/sda
Uninstall: umount /dev/sda*
Fix:badblocks /dev/sda

Learn from scratchpython

[Learn python from zero] 92. Use Python's requests library to send HTTP requests and process responses
[Learn python from zero] 91. Use decorators and dictionaries to manage simple web applications for request paths
[Learn python from zero] 93. Use dictionary management Request path
[Learn python from zero] 89. Use WSGI to build a simple and efficient web server
[Learn python from zero] 88. Detailed explanation of WSGI interface: realize simple and efficient web development
[Learn python from zero] 87. Manually build HTTP server Python Implementation and multi-threaded concurrent processing
[learning python from zero] 86. In-depth understanding of HTTP protocol and its role in browser and server communication
[learning python from zero] 85. Parallel computing technology application of Python process pool
[learning python from zero ] 84. In-depth understanding of threads and processes
[learning python from zero] 83. Python multi-process programming and the use of process pools
[learning python from zero] 82. Realization of chat programs based on multi-threading
[learning python from zero] 81. Python and more Application of thread communication and queue
[learning python from zero] 80. Thread access to global variables and thread safety issues
[learning python from zero] 79. Thread access to global variables and thread security issues
[learning python from zero] 78. File download cases
[ Learning python from zero] 77. TCP server programming and precautions
[learning python from zero] 76. Server and client: key components of network communication
[learning python from zero] 75. TCP protocol: reliable connection-oriented transmission layer communication protocol
[Learn python from zero] 74. UDP network program: detailed explanation of port problems and binding information
[Learn python from zero] 73. UDP network program - send data
[Learn python from zero] 72. In-depth understanding of Socket communication and socket creation The method of
[learning python from zero] 71. Network ports and their functions
[learning python from zero] 70. Network communication methods and their applications: from direct communication to routers to connect multiple networks
[learning python from zero] 69. Network communication and IP address classification analysis
[learning python from zero] 68. Greedy and non-greedy modes in Python regular expressions
[learning python from zero] 67. re module in Python: regular replacement and advanced matching technology
[learning python from zero] 66 .In-depth understanding of regular expressions: a powerful tool for pattern matching and text processing
[Learn python from zero] 65. Detailed explanation of Python regular expression modifiers and their applications
[Learn python from zero] 64. The re.compile method in Python regular expressions Detailed explanation
[learning python from zero] 63. Introduction to the re.Match class in regular expressions and its attributes and methods
[learning python from zero] 62. Python regular expressions: a powerful string matching tool
[learning python from zero] 61. Detailed explanation and application examples of property attributes in Python
[learning python from zero] 60. Exploration generator: a flexible tool for iteration
[learning python from zero] 59. Iterator: an efficient tool for optimizing data traversal
[learning python from zero] 58. Custom exceptions in Python and methods of raising exceptions
[Learn python from zero] 57. Use the with keyword in Python to correctly close resources
[Learn python from zero] 56. The importance and application of exception handling in programming
[Learn python from zero] 55. Serialization and processing in Python Deserialization, application of JSON and pickle modules
[learning python from zero] 54. Writing data in memory
[learning python from zero] 53. CSV files and Python CSV modules
[learning python from zero] 52. Reading and writing files - Python file operation guide
[learning python from zero] 51. Opening and closing of files and its application in Python
[learning python from zero] 49. Object-related built-in functions in Python and their usage
[learning python from zero] 48 .Detailed explanation of inheritance and multiple inheritance in Python
[learning python from zero] 47. The concept and basic use of inheritance in object-oriented programming
[learning python from zero] 46. __new__ and __init__ method analysis and singleton in Python Design patterns
[learning python from zero] 45. Class methods and static methods in Python
[learning python from zero] 44. Private attributes and methods in object-oriented programming
[learning python from zero] 43. Examples in Python object-oriented programming Attributes and class attributes
[Learn python from zero] 42. Built-in attributes and methods in Python
[Learn python from zero] 41. Python magic method (2)
[Learn python from zero] 40. Python magic method (1)
[Learn python from zero] 39. Object-oriented basic grammar and application examples
[Learn python from zero] 38. Use and import of Python packages
[Learn python from zero] 37. Use and precautions of Python custom modules
[From zero Learning python] 36. Methods and skills of using pip in Python for third-party package management
[learning python from zero] 35. Python common system modules and their usage
[learning python from zero] 34. Detailed explanation of the import and use of Python modules
[ Learn python from zero] 33. The role of decorators (2)
[Learn python from zero] 32. The role of decorators (1)
[Learn python from zero] 31. In-depth understanding of higher-order functions and closures in Python
[from Zero learning python] 30. In-depth understanding of recursive functions and anonymous functions
[learning python from zero] 29. "Detailed explanation of function parameters" - understand the different usages of Python function parameters
[learning python from zero] 28. Local variables and globals in Python Variables
[Learn python from zero] 27. Use and nested calls of Python functions
[Learn python from zero] 25. Functions: a tool to improve code writing efficiency
[Learn python from zero] 24. String operations and traversal methods in Python
[Learn python from zero] 23. How to use and common operations of sets (set) in Python
[Learn python from zero] 22. Addition, deletion, modification and query of dictionaries in Python and variables of dictionaries
[Learn python from zero] 21. In Python tuples and dictionaries for
[Learn python from zero] 20. Python list operation skills and examples
[Learn python from zero] 19. Application of looping through lists and list nesting
[Learn python from zero] 18. Detailed explanation of basic operations of Python lists (1)
[From Zero learning python] 17. Format method of Python string (2)
[Learn python from zero] 16. Format method of Python string (1)
[Learn python from zero] 15. In-depth understanding of string and character set encoding
[from Zero learning python] 14. Common operations of Python strings (2)
[Learn python from zero] 13. Common operations of Python strings (1)
[Learn python from zero] 12. Python string operations and applications
[Learn python from zero] 11.Python loop statement and control flow
[learn python from zero] 10. Detailed explanation of Python conditional statement and if nesting
[learn python from zero] 09. Conditional judgment statement in Python
[learn python from zero] 08. Python understands bit operations Operators, operator priority
[learn python from zero] 07. Detailed explanation of Python operators: assignment, comparison and logical operators
[learn python from zero] 06. Use arithmetic operators in Python for calculation and string concatenation
[learn from zero python] 05. Output and input in Python
[learn python from zero] 04. Basics of Python programming: variables, data types and identifiers
[learn python from zero] 03. Python interactive programming and detailed annotations
[Learn python from zero] 02. Introduction to development tools
[Learn python from zero] 01. Install and configure python

Guess you like

Origin blog.csdn.net/qq_33681891/article/details/132595457