Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, everyone. I am a newbie here. I would like to know if I want to vi /proc/sys/net/ipv4/ip_forward, but assume that I don't know the path of ip_forward, is there ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3

    How to find/locate it?

    Hi, everyone. I am a newbie here. I would like to know if I want to vi /proc/sys/net/ipv4/ip_forward, but assume that I don't know the path of ip_forward, is there a way to tell where is it?

    Thanks

  2. #2
    Just Joined!
    Join Date
    Apr 2010
    Location
    San Diego, CA
    Posts
    10
    The ironic thing is that the subject of your post contains two commands which will do just that...

    find and locate

    redhat.com/docs/manuals/enterprise/RHEL-4-Manual/step-guide/s1-managing-locating.html]Locating Files and Directories (won't let me post a link)

    Also, another command I wish I would have know about earlier on is the apropos command. This is useful if you don't know a command name, but you know what it should do. It searches the whatis descriptions for your keyword. Say for example you want to find commands related to iptables, type:

    apropos iptables

    You can access manuals or "man pages" for each command by typing "man command". Sometime the man pages will have a SEE ALSO section which will help you find related commands.

    Hope this helps.

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3
    Quote Originally Posted by corysmith View Post
    The ironic thing is that the subject of your post contains two commands which will do just that...

    find and locate

    redhat.com/docs/manuals/enterprise/RHEL-4-Manual/step-guide/s1-managing-locating.html]Locating Files and Directories (won't let me post a link)

    Also, another command I wish I would have know about earlier on is the apropos command. This is useful if you don't know a command name, but you know what it should do. It searches the whatis descriptions for your keyword. Say for example you want to find commands related to iptables, type:

    apropos iptables

    You can access manuals or "man pages" for each command by typing "man command". Sometime the man pages will have a SEE ALSO section which will help you find related commands.

    Hope this helps.
    Corysmith, thanks for your reply, I think you got my question wrong. I meant eg. if I need to to edit the ip_forward,but I do not know where is this "ip_forward", how do I find the path to it?

  4. #4
    Just Joined!
    Join Date
    Apr 2010
    Location
    San Diego, CA
    Posts
    10
    My friend, I believe I did answer your question correctly. If you read the documentation at the link I sent you, you could derive that the path to ip_foward could be found with either:

    Code:
    updatedb
    locate ip_forward
    or

    Code:
    find / -name ip_forward
    Additionally, you could discover these commands for yourself by typing either:

    Code:
    apropos find | less
    or

    Code:
    apropos locate | less
    Also, if you are working with RHEL, don't be shy about searching their knowledge base, as this is some of the most thoroughly documented software I know of.

Posting Permissions

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