Results 1 to 6 of 6

Thread: Find out what those commands are for!

  1. #1
    Member registered user
    Join Date
    Nov 2002
    Posts
    85

    Find out what those commands are for!

    Have you ever wanted to know what the commands in these directories do:
    /bin
    /sbin
    /usr/bin

    There is a command called whatis and xargs, that can be used quite creatively to print out quick definitions of all the command in a directory.
    Code:
    ls | xargs whatis | less
    Move to the bin directory of your choice and follow the example below:

    Code:
    root@0[/]# cd /bin
    root@0[bin]# ls | xargs whatis | less
    afio (1)             - manipulate archives and files
    arch (1)             - print machine architecture
    ash (1)              - a shell
    ash.static: nothing appropriate.
    bash (1)             - GNU Bourne-Again SHell
    bsd-csh (1)          - a shell (command interpreter) with C-like syntax
    bsh (1)              - a shell
    cat (1)              - concatenate files and print on the standard output
    chgrp (1)            - change group ownership
    
    etc... etc... etc...
    These will print out the whatis for every command in the directory you are in so you can get a quick overview of the commands listed.

    Enjoy!

  2. #2
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    23
    THANK YOU!!

  3. #3
    Member registered user
    Join Date
    Nov 2002
    Posts
    85
    No problem!
    This was a tip I learned a few years ago (I think) and it just popped back into my brain so I thought I would share it.

  4. #4
    Senior Member registered user
    Join Date
    Nov 2002
    Posts
    1,353
    I like "dpkg -l |less"

    On a Debian system this will give you a list of all the packages you have installed on your machine with descriptions of what the package does.

    For example:

    ii 3270-common 3.2.17-2 Common files for IBM 3270 emulators {x,c,s,t
    ii a2ps 4.13b-20 GNU a2ps - 'Anything to PostScript' converte
    ii aalib-bin 1.4p5-17 sample programs using aalib
    ii aalib1 1.4p5-17 ascii art library
    ii abiword 1.9.0+cvs.2003 WYSIWYG word processor based on GTK2
    ii abiword-common 1.9.0+cvs.2003 WYSIWYG word processor based on GTK2
    ii ace-of-penguin 1.2-5 Solitaire-games with penguin-look
    ii acme 2.0.3-1 Enables the "multimedia buttons" found on la
    ii acroread 5.06-0.4 Adobe Acrobat Reader: Portable Document Form
    ii adduser 3.50 Add and remove users and groups

    The nice thing about this is that it also gives you the version of the package you have installed.

    If you want to look up just one package, you can do this "dpkg -l packagename"

    Ex. "dpkg -l cpio" yeilds

    cpio 2.5-1 GNU cpio -- a program to manage archives of files.

  5. #5
    Junior Member
    Join Date
    Jan 2003
    Location
    Warsaw, Poland
    Posts
    6

    polish translation of this article / polskie t?umaczenie

    polish translation of this article / polskie t?umaczenie tego artyku?u

    http://debiandiary.aso.strefa.pl/vie...asc&highlight=

  6. #6
    Junior Member
    Join Date
    Aug 2003
    Posts
    2
    xargs isn't necessary. You could do something like the following:

    Code:
    whatis `ls` |more
    The backticks around ls are expanded out to the output of the command. Therefore, if you had a directory consisting of two files, foo and bar, `ls` would expand out to "foo bar". The full command, after being fully expanded, in this case, would be:

    Code:
    whatis foo bar |more

Similar Threads

  1. List of linux commands
    By rickenbacherus in forum General Support
    Replies: 21
    Last Post: 04-24-2008, 02:48 AM
  2. Editing Boot commands
    By lbenn in forum Hardware & Booting
    Replies: 0
    Last Post: 05-22-2005, 12:32 AM
  3. questions...how do I add commands to startup?
    By ghostblaze in forum General Support
    Replies: 6
    Last Post: 10-29-2004, 12:53 PM
  4. Difference in commands??
    By knopphead in forum Hardware & Booting
    Replies: 2
    Last Post: 04-27-2004, 01:08 AM
  5. Help with boot commands
    By EmoRock in forum General Support
    Replies: 3
    Last Post: 08-25-2003, 03:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell - 800GB SSD SAS 12G MLC WI 2.5in PX05SM CN3JH picture

Dell - 800GB SSD SAS 12G MLC WI 2.5in PX05SM CN3JH

$98.99



WD_BLACK 4TB SN850X NVMe SSD, Internal Gaming Solid State Drive - WDS400T2X0E picture

WD_BLACK 4TB SN850X NVMe SSD, Internal Gaming Solid State Drive - WDS400T2X0E

$309.99



Dell 800GB SSD U.2 NVMe 2.5

Dell 800GB SSD U.2 NVMe 2.5" PCIe Gen3 KWH83 MZWLL800HEHP-000D3 PM1725a

$71.99



SanDisk 2TB Ultra 3D NAND SSD, Internal Solid State Drive - SDSSDH3-2T00-G25 picture

SanDisk 2TB Ultra 3D NAND SSD, Internal Solid State Drive - SDSSDH3-2T00-G25

$129.99



Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5

Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot

$14.99



Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture

Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot

$13.99



Sk Hynix SC308 SATA 128GB HFS128G39TND-N210A M.2 SSD Solid State Drive 0XXHGF picture

Sk Hynix SC308 SATA 128GB HFS128G39TND-N210A M.2 SSD Solid State Drive 0XXHGF

$7.44



Samsung - 980 PRO 1TB Internal Gaming SSD PCIe Gen 4 x4 NVMe picture

Samsung - 980 PRO 1TB Internal Gaming SSD PCIe Gen 4 x4 NVMe

$109.99



Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive picture

Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive

$249.99



Fanxiang 256GB 512GB 1TB 2TB 4TB Internal SSD 2.5

Fanxiang 256GB 512GB 1TB 2TB 4TB Internal SSD 2.5" SATA III 6GB/s for PC/MAC Lot

$197.99