In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use the patch command in Linux, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.
The Linux common command patch command is used to install patches for open source software. Let users modify and update the original file by setting the way to patch the file.
Patch installs patches for open source software
It is added that if only one file is modified at a time, instructions can be issued directly in the command line to be executed in sequence. If you cooperate with the way of patching files, you can repair a large number of files at one time, which is also one of the core upgrade methods of the Linux system.
Syntax patch (option) (parameter) option-b or-- backup: back up each original file;-B or-- prefix=: sets the prefix string appended to the file name when backing up the file, which can be the path name;-c or-- context: interprets the patch data into relational differences;-d or-- directory=: sets the working directory -D or-- ifdef=: marks the changes with the specified symbol;-e or-- ed: interprets the patch data into a narrative file available for the ed instruction;-E or-- remove-empty-files: removes the file if the output file after the patch is blank;-f or-- force: this parameter has the same effect as the specified "- t" parameter, but assumes that the version of the patch data is a new version. -F or-- fuzz: sets the maximum number of monitored columns;-g or-- get=: sets RSC or SCCS to control patch operations;-I or-- input=: reads the specified patch questioner;-l or-- ignore-whitespace: ignores tabs and space characters between patch data and input data;-n or-- normal: interprets patch data into general differences -N or-- forward: ignore that the patched data is older than the version of the original file, or that the patched data has been used;-o or-- output=: sets the name of the output file under which the patched file will be stored;-p or-- strip=: sets several layers of path names to be stripped;-f or-- reject-file=: setting saves the file name that rejects patching information, and the default file name is .rej. -R or-- reverse: assume that the patch data is generated by the exchange location of the old and new files;-s or-- quiet or-- silent: do not show instruction execution unless an error occurs;-t or-- batch: automatically skip the error and do not ask any questions;-T or-- set-time: the effect of this parameter is similar to that of the specified "- Z" parameter, but mainly local time -u or-- unified: interprets patch data into consistent differences;-v or-- version: displays version information After-V or-- version-control=: back up the target file with the "- b" parameter, the backup file suffixes are appended with a backup string. This string can not only be changed with the "- z" parameter, but also generate backup strings with different suffixes when using the "- V" parameter to specify different backup methods. -Y or-- basename-prefix=--: sets the prefix string appended to the beginning of the basic name of the file;-z or-- suffix=: this parameter has a similar effect to specifying the "- B" parameter, except that the path used by the repair job is src/linux/fs/super.c and if the file name is src/linux/fs/super.c and the "backup/" string is added, the file super.c will be backed up in the / src/linux/fs/backup directory -Z or-- set-utc: set the access time of the patched file to UTC;-- backup-if-mismatch: back up the file only when the patched data does not match and the file is not deliberately specified to back up;-- binary: read and write data in binary mode without going through the standard output device;-- help: online help -- nobackup-if-mismatch: do not back up files when the patched data do not match and do not deliberately specify to back up files;-- verbose: show the execution of instructions in detail. Parameter original file: specify the original file that needs to be patched
Patch file: specify the patch file.
Thank you for reading this article carefully. I hope the article "how to use patch commands in Linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.