
파일이 있다고 가정해 보겠습니다. 이 파일은 복잡한 위치(100개의 하위 폴더 내)에 저장되어 있지만 그럼에도 불구하고 많이 사용합니다. 이 파일에 일련의 키워드(예: "내가 가장 좋아하는 파일")를 할당한 다음 나중에 일부 자연어 프로세서(명령줄 인터페이스 또는 음성 인식 소프트웨어)에 해당 키워드를 입력하여 해당 파일을 여는 방법이 있습니까? ? 명령줄에 "즐겨찾는 파일 열기"를 입력하거나 음성 인식 소프트웨어에서 "즐겨찾는 파일 열기"라고 말할 수도 있습니다.
그런 서비스가 존재하나요?
답변1
예, 그렇습니다:
@emory의 설명에 따라 링크를 만듭니다.
환경변수로 만들어 보세요. 쉘의 초기화 파일에 다음 행을 추가하십시오(
~/.bashrc
bash를 사용하는 경우).myfile="/absurdly/long/path/that/you/would/오히려/not/type/every/time"
$myfile
그런 다음 명령줄에서 실제 파일 이름인 것처럼 사용할 수 있습니다 .$ echo $myfile /absurdly/long/path/that/you/would/rather/not/type/every/time $ cat > $myfile This is so much easier now! $ cat $myfile This is so much easier now!
예를 들어, 특정 목적으로 파일을 사용하는 경우(예를 들어 단순히
cat
터미널에 파일을 저장하는 경우) 동일한 작업을 수행하는 별칭을 설정할 수도 있습니다. 이것을 쉘의 초기화 파일에 추가하십시오:alias myfile='cat /absurdly/long/path/that/you/would/rather/not/type/every/time'
그런 다음 실행해 보세요.
$ myfile This is so much easier now!
답변2
심볼릭 링크를 만들 수 있나요?
ln -sf /some/complex/location/1/2/{your complex directory structure}/100/FavoriteFile /home/me/Desktop/FavoriteFile
파일은 여전히 복잡한 위치에 있지만 데스크톱에서 액세스할 수 있습니다.
답변3
ctags가 아마도 이에 대해 도움을 줄 수 있을 것입니다. 컴퓨터 소스 코드 파일을 색인화하고 해당 파일이 포함된 파일이나 해당 파일이 어디에 있는지 정확히 알 필요가 있는 함수나 루틴을 쉽게 찾을 수 있도록 만들어졌습니다.
매뉴얼 페이지에서 발췌:
Tag index files are supported by numerous editors, which allow the user
to locate the object associated with a name appearing in a source file
and jump to the file and line which defines the name. Those known about
at the time of this release are:
Vi(1) and its derivatives (e.g. Elvis, Vim, Vile, Lemmy), CRiSP,
Emacs, FTE (Folding Text Editor), JED, jEdit, Mined, NEdit (Nirvana
Edit), TSE (The SemWare Editor), UltraEdit, WorkSpace, X2, Zeus
Ctags is capable of generating different kinds of tags for each of many
different languages. For a complete list of supported languages, the
names by which they are recognized, and the kinds of tags which are
generated for each, see the --list-languages and --list-kinds options.
행운을 빌어요.