현재 터미널 위치에서 Finder 창을여시겠습니까? 경우 새로운 Finder

터미널 창의 특정 경로에있는 경우 새로운 Finder 창에서 같은 창을 어떻게 열 수 있습니까?

참고 : 이것은 Finder에서 터미널여는 것과 반대입니다 .



답변

open .터미널에 입력 하면 Finder 윈도우에서 현재 작업 디렉토리가 열립니다.


답변

스트레칭 목표!

위의 답변을 확장하려면 (보다 적절한 관련 질문 은 속임수로 표시되어 새로운 답변을받을 수 없기 때문에) …

~ / .bash_profile에 파일 또는 디렉토리 공개를 처리하는 기능을 추가했습니다.

# Reveal a file or directory in Finder
# ..expects only one argument
# the argument is quoted to accommodate spaces in the filename
reveal () {
   # if the first arg is a directory
   if [[ -d "$1" ]];
       then
           # ..use the argument directly
           basedir="$1"
       else
           # ..we passed a file, so use its containing directory
           basedir=$(dirname "$1")
   fi
   # basedir is a directory in now, so open will activate Finder
   open "$basedir"
}

기능을 설치하려면

  • ~ / .bash_profile에 붙여 넣기 / 저장
  • source ~/.bash_profile 또는 새로운 터미널 / 탭을여십시오

내 사용의 맥락은 ls탭 완성을 사용하여 둘러보고 탐색 한 다음 찾고있는 것을 찾으면 다음 과 같이 가장 최근의 인수를 할 수 있습니다 reveal( cd또는 subl).

ls dir/subdir<tab tab>
subsubdir  anotherdir
ls dir/subdir/anotherdir
reveal !$

답변

autojump설치 한 경우 디렉토리의 전체 경로를 입력하지 않아도됩니다. 간단히 입력 jo partialdirectoryname하면 autojump가 지정된 디렉토리에 새로운 Finder 윈도우를 엽니 다.

전체 디렉토리 이름을 기억할 필요가 없기 때문에이 방법을 좋아합니다. Autojump는 가장 일반적으로 사용되는 위치 목록을 유지하며 이름의 일부만 제공하더라도 참조하고있는 디렉토리를 자동으로 인식합니다.


답변

open .

추가로 .bash_profile 또는 .bash_aliases에 별칭이 있으면 추가하십시오.

alias finder='open'

그런 다음 finder .더 직관적이라고 생각하는 것을 사용할 수 있습니다 .


답변

open .터미널에 입력 하면 Finder 윈도우에서 현재 작업 디렉토리가 열립니다.

그러나 다른 버전도 있습니다

open `pwd`