Results 1 to 3 of 3

Thread: make command to run only with specific parameters

  1. #1
    Join Date
    Dec 2010
    Beans
    37

    make command to run only with specific parameters

    Hi ...again

    Is it possible to force a command to be run only with specific parameters?

    For instance i would like the command iptables to be run only with paramter lets say -L

    thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Northern Alberta, Canada
    Beans
    109
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: make command to run only with specific parameters

    Not exactly sure if this is exactly what you want, but you can make an alias.

    Code:
    alias iptables='iptables -L'
    alias ls='ls --color=auto --classify --human-readable --group-directories-first
    You can type them in at any command line prompt, or better yet, add them to ~/.bash_aliases to make them apply every time you log in.
    I'd rather have a bottle in front of me, than a frontal lobotomy!

  3. #3
    Join Date
    Dec 2010
    Beans
    37

    Re: make command to run only with specific parameters

    Quote Originally Posted by spillin_dylan View Post
    Not exactly sure if this is exactly what you want, but you can make an alias.

    Code:
    alias iptables='iptables -L'
    alias ls='ls --color=auto --classify --human-readable --group-directories-first
    You can type them in at any command line prompt, or better yet, add them to ~/.bash_aliases to make them apply every time you log in.
    Wicked! Thanks spillin!

Bookmarks

Posting Permissions

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