"리눅스 command"의 두 판 사이의 차이

29번째 줄: 29번째 줄:
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# ls /var
backups  cache  lib  local  lock  log  mail  opt  run  spool  tmp  www
root@zetawiki:~# command ls /var
root@zetawiki:~# command ls /var
backups  crash local  log   opt spool www
backups  cache  lib  local lock log  mail opt run spool tmp www
cache lib lock  mail run tmp
root@zetawiki:~# command -p ls /var
root@zetawiki:~# ls /var
backups  cache  lib local lock log  mail opt run spool tmp www
backups  crash local  log   opt spool www
cache    lib    lock  mail run  tmp
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# command -v ls /var
root@zetawiki:~# command -v ls
alias ls='ls $LS_OPTIONS'
alias ls='ls $LS_OPTIONS'
root@zetawiki:~# alias ls
root@zetawiki:~# alias ls
alias ls='ls $LS_OPTIONS'
alias ls='ls $LS_OPTIONS'
root@zetawiki:~# type ls
ls is aliased to `ls --color=auto'
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
49번째 줄: 51번째 줄:
l: command not found
l: command not found
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
root@zetawiki:~# type ls
ls is aliased to `ls --color=auto'
root@zetawiki:~# which ls
root@zetawiki:~# which ls
/bin/ls
/bin/ls

2022년 3월 7일 (월) 02:31 판

  다른 뜻에 대해서는 Command 패턴 문서를 참조하십시오.
  다른 뜻에 대해서는 명령어 문서를 참조하십시오.

1 개요

리눅스 command
root@zetawiki:~# type command
command is a shell builtin
root@zetawiki:~# command --help
command: command [-pVv] command [arg ...]
    Execute a simple command or display information about commands.

    Runs COMMAND with ARGS suppressing  shell function lookup, or display
    information about the specified COMMANDs.  Can be used to invoke commands
    on disk when a function with the same name exists.

    Options:
      -p    use a default value for PATH that is guaranteed to find all of
            the standard utilities
      -v    print a description of COMMAND similar to the `type' builtin
      -V    print a more verbose description of each COMMAND

    Exit Status:
    Returns exit status of COMMAND, or failure if COMMAND is not found.
root@zetawiki:~# ls /var
backups  cache  lib  local  lock  log  mail  opt  run  spool  tmp  www
root@zetawiki:~# command ls /var
backups  cache  lib  local  lock  log  mail  opt  run  spool  tmp  www
root@zetawiki:~# command -p ls /var
backups  cache  lib  local  lock  log  mail  opt  run  spool  tmp  www
root@zetawiki:~# command -v ls
alias ls='ls $LS_OPTIONS'
root@zetawiki:~# alias ls
alias ls='ls $LS_OPTIONS'
root@zetawiki:~# type ls
ls is aliased to `ls --color=auto'
root@zetawiki:~# l /var
backups/  crash/  local/  log/   opt/  spool/  www/
cache/    lib/    lock@   mail/  run@  tmp/
root@zetawiki:~# command l /var
l: command not found

root@zetawiki:~# which ls /bin/ls root@zetawiki:~# type l l is aliased to `ls -CF' root@zetawiki:~# which l root@zetawiki:~# </syntaxhighlight>

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}