How to find the source code of Linux commands

Source: Internet
Author: User

For example, if you want to find the source code of the tools such as ls, cat, grep, and less, you can find everything on google, but it is more convenient to use the software package management tool. Take the source code of cat as an example:
[Whb @ jcwkyl keyan] $ which cat

/Bin/cat
[Whb @ jcwkyl keyan] $ rpm-qif/bin/cat

Name
:
Coreutils
Relocations: (not relocatable)
Version:
5.97
Vendor: CentOS
Release:
14. el5
Build Date: Sat 24 May 2008 11:19:56 pm CST
Install Date: Tue 03 Nov 2009 03:18:40 am CST build host: builder10.centos.org
Group
: System Environment/base Source
Rpm: coreutils-5.97-14.el5.src.rpm
Size
:
9021731
License: gplv2 +
Signature: DSA/sha1, Sun 15 Jun 2008 07:29:51 am Cst, key ID a8a447dce8562897
URL: http://www.gnu.org/software/coreutils/
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
Description:
These are the GNU core utilities. This package is the combination
The old GNU fileutils, sh-utils, and textutils packages.
Cat is a tool in coreutils. Its home page is
Command source code. Or search for cat coreutils on google code.
In addition, the command line parameters of rpm are clearly classified in its man document. There are five categories: query, verify, install, upgrade, and remove, the options provided by each type of operation are also very clear.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.