nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Can we see the content of a command?

This is a discussion on Can we see the content of a command? within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi all, This is bit strange.. Can we see the content of any command? for example vi /bin/ls .. this ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-11-2009, 07:58 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 450
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default Can we see the content of a command?

Hi all,

This is bit strange.. Can we see the content of any command? for example vi /bin/ls .. this is giving some unrecognizable code(i know this is compiled). is there any way to see the content of any command..

i can get a source code from net to see what actually ls command will do.. but my question is.. Is it possible to local system /bin/ls content..?
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
  #2 (permalink)  
Old 09-11-2009, 08:08 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Naa, until and unless you use disassemblers software. Getting source code is the best thing to view source code under Linux / BSD etc. /bin/ls and others are binary files which will be loaded by Linux loader (linker) such as /lib64/ld-linux-x86-64.so.2 or /lib/ld-linux.so.2
Code:
 /lib64/ld-linux-x86-64.so.2  /bin/ls
All Linux programs are incomplete and require further linking at run time using ld-linux. This is does to save binary size.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 09-11-2009, 08:31 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 450
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default hmm thanks..

thanks for the inputs..
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
Reply

Tags
ld-linux-x86-64.so.2 , linker , linux , loader , unix


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
trying to understand named.log content speederpro Networking, Firewalls and Security 2 04-09-2009 04:04 AM
save command and command output savook CentOS / RHEL / Fedora 1 08-05-2009 05:33 PM


All times are GMT +5.5. The time now is 01:52 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38