factor command in Linux with examples
The factor command in Linux is used to print the prime factors of the given numbers, either given from command line or read from standard input.
The numbers given through standard input may be delimited by tabs, spaces or newlines.
Syntax:
factor [NUMBER]
-
Factor 100(non-prime number):

We get the prime factors 2 and 5 that make up 100. -
Factor 13(prime number itself) :
Factor of 221(product of two primes) :
Under the hood, the factor command uses the Pollard-Brent rho algorithm to find out the prime factors.
factor --help: This command only supports a few numbers of options, that is its help command and version number.
Recommended Posts:
- atq command in linux with examples
- pwd command in Linux with Examples
- ps command in Linux with Examples
- man command in Linux with Examples
- id command in Linux with examples
- Cat command in Linux with examples
- fmt command in Linux with examples
- ZIP command in Linux with examples
- apt command in linux with examples
- cd command in Linux with Examples
- fg command in Linux with examples
- tty command in Linux with examples
- rev command in Linux with Examples
- until command in Linux with Examples
- apt-get command in Linux with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



