권한없이 리다이렉션 사용하기 (Linux shell)
매번 할 때마다 잊어 버리고 검색하고... 정리한걸 보고 감탄한다.
계속 이럴 수는 없다고 생각해서 아래 글을 내가 사용하는 명령어로 정리해봅니다.
http://onecellboy.tistory.com/291
mips64-octeon-linux-gnu-objdump -DSl sync.o | sudo tee sync.objdump
sync.o라는 C Object를 objdump해서 sync.objdump라는 파일로 생성한다.
(mips64-octeon-linux-gnu-objdump -DSl sync.o > sync.objdump 이걸 하고자 했지만 권한 문제로 인해...)
아래는 tee manual page 입니다.
TEE(1) User Commands TEE(1)
NAME
tee - read from standard input and write to standard output and files
SYNOPSIS
tee [OPTION]... [FILE]...
DESCRIPTION
Copy standard input to each FILE, and also to standard output.
-a, --append
append to the given FILEs, do not overwrite
-i, --ignore-interrupts
ignore interrupt signals
--help display this help and exit
--version
output version information and exit
If a FILE is -, copy again to standard output.
AUTHOR
Written by Mike Parker, Richard M. Stallman, and David MacKenzie.
REPORTING BUGS
Report tee bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
COPYRIGHT
Copyright © 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent
permitted by law.
SEE ALSO
The full documentation for tee is maintained as a Texinfo manual. If the info and tee programs are prop‐
erly installed at your site, the command
info coreutils 'tee invocation'
should give you access to the complete manual.
GNU coreutils 7.4 January 2015 TEE(1)