LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-06-2007, 04:17 AM   #1
kalyanofb
LQ Newbie
 
Registered: Feb 2007
Posts: 21

Rep: Reputation: 15
Linux Commands List in a file


Hai,

How to get all the linux commands in a text file
 
Old 02-06-2007, 05:17 AM   #2
muha
Member
 
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 38
Hmm, something like:
Code:
apropos .
gives a listing of commands and brief explanation.
Code:
apropos . > file
puts it into a file

Other ways might be:
Code:
ls /usr/bin
ls /usr/sbin/
 
Old 02-06-2007, 07:10 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
You might want to filter out command-line items only - "apropos ." will list manual pages for C library calls and file formats and system calls etc... Try this:
Code:
apropos . | fgrep "(1)" > file
 
Old 02-06-2007, 02:18 PM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
or
Code:
(IFS=:;ls -1 $PATH)
 
Old 01-17-2008, 01:21 AM   #5
kalyanwiki
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
get linux commands

[QUOTE]
Quote:
Originally Posted by kalyanofb;2[/QUOTE
618461]Hai,
[URL="http://ploug.eu.org/doc/rute.pdf"]"http://ploug.eu.org/doc/rute.pdf"]
How
to get all the linux commands in a text file
hei it is easy man to get list of linux commands
in net i am also newbie but i got it by using google by quoting as

Linux commands PDF you can also download the RUTE but i caution u that it is very big file so it will take a bit of your time but it is full guide to u
 
Old 01-17-2008, 07:56 AM   #6
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Here's my attempt. It's a little more complicated but easier on my eyes. If you run it as a regular user vs. root, you will get different results (assuming that you have different paths which you will on most systems).
Code:
#!/usr/bin/perl
use strict;
use warnings;
 
chomp(my @path = split (":", `echo \$PATH`));
 
foreach my $directory (@path) {
     print "Items in $directory:\n";
     chdir "$directory"
         or die "Can't chdir to $directory: $!\n";
     print map { "\t$_\n" } grep { -x $_ } glob "*" ;
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which file contains a list of all commands that have been typed frontlinedr Linux - General 5 07-14-2006 06:35 AM
list of commands for Devil-Linux cyniq Linux - Newbie 1 11-13-2005 11:49 PM
argument list to long for linux commands supersucker Linux - Newbie 1 05-10-2005 07:36 AM
List of Linux Commands from O'Reily trickykid Linux - General 2 09-17-2003 12:28 PM
List of all linux basic, advance and administration commands kuldeep_tiwari Linux - General 12 05-15-2002 06:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration