ls /home/*.exe /home/1.exe /home/2.exe
위와 출력이 되어버리는데요.
1.exe 2.exe 파일명만 출력하게끔 할려고 합니다.
find /home/ -name '*.exe' 이렇게 해도 경로까지 다 나오네요.
파일명만 가져올 방법이 없나요?
물론 현재 /home 디렉토리로 이동 후 ls *.exe하면 되지만
이 방법말고는 없는건가요?
(스크립트 사용)
find /home/ -name '*.exe' -exec basename {} \;
Nevermind... :)
$ for file in /home/*.exe; do echo `basename $file`; done
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
ls -1 /home/*.exe | sed 's;.*/;;'
=================================== 행동할 때 열정은 자라난다.
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
find /home/ -name '*.exe' -exec basename {} \;
find /home/ -name '*.exe' -exec basename {} \;
Nevermind... :)
음...
$ for file in /home/*.exe; do echo `basename $file`; done
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
ls -1 /home/*.exe | sed 's;.*/;;'
ls -1 /home/*.exe | sed 's;.*/;;'
===================================
행동할 때 열정은 자라난다.
댓글 달기