Skip to main content

cd (명령어) 목차 사용법 옵션 동작 방식 참조 둘러보기 메뉴cd(1)cdeheh문서를 완성해

catcdddchmodchownchgrpcksumcmpcpdudffsckfuserlnlslsofmkdirmountmvpwdrmrmdirsplittouchumaskenvfingeridlognamemesgpasswdsusudouptimewwallwhowhoamiwritealiasbasenamedirnameechoexprprintftestunsetfindgreplocatewhereiswhichbannerbccalcleardateddfilehistoryinfolplprpaxsizeteetputtypeunamewhatisyestrue와 falseattribcdchdircopydeldeltreedireraseexpandfdiskformatmakecabmdmkdirmklinkmountvolmoventbackuprdrenamerenrmdirrobocopysfcsystypexcopyatexitkillschtasksstartscshutdowntaskkilltasklisttlisteditedlinmoresortarpatmadmcmstpftpgetmachostnameipconfignbtstatnetnetshnetstatnslookuppathpingpingrcprexecroutershtcmsetuptelnettftptracertbcdeditbootcfgclshelpprintdebugexe2binlpqlprmsiexecpentntw32tmwmic


유닉스 SUS2008 유틸리티윈도우 명령어내부 도스 명령어디렉토리윈도우 관리


유닉스윈도도스작업 디렉터리명령 줄셸 스크립트배치 파일디렉터리파일 시스템명령 줄 인터프리터유닉스 셸본 셸tsch배시cmd.exe윈도 파워 셸COMMAND.COM










(function()var node=document.getElementById("mw-dismissablenotice-anonplace");if(node)node.outerHTML="u003Cdiv class="mw-dismissable-notice"u003Eu003Cdiv class="mw-dismissable-notice-close"u003E[u003Ca tabindex="0" role="button"u003E숨기기u003C/au003E]u003C/divu003Eu003Cdiv class="mw-dismissable-notice-body"u003Eu003Cdiv id="localNotice" lang="ko" dir="ltr"u003Eu003Cpu003Eu003Ca href="/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:3.1%EC%9A%B4%EB%8F%99_100%EC%A3%BC%EB%85%84_%EA%B8%B0%EB%85%90_%EC%97%90%EB%94%94%ED%84%B0%ED%86%A4" title="위키백과:3.1운동 100주년 기념 에디터톤"u003E3.1운동 100주년 기념 에디터톤u003C/au003E(~4.11) 오프라인 모임이 4월 7일 열립니다.nu003C/pu003Eu003Cpu003Eu003Ca href="/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:%EA%B3%BC%ED%95%99%EC%9D%98_%EB%8B%AC_%EC%97%90%EB%94%94%ED%84%B0%ED%86%A4" title="위키백과:과학의 달 에디터톤"u003E과학의 달 에디터톤u003C/au003E이 4월 1일부터 4월 30일까지 진행됩니다.nu003C/pu003Eu003C/divu003Eu003C/divu003Eu003C/divu003E";());




cd (명령어)




위키백과, 우리 모두의 백과사전.






둘러보기로 가기
검색하러 가기



cd 또는 chdir은 디렉터리 변경(change directory)의 준말이며, 유닉스, 윈도, 도스와 같은 운영체제에서 현재의 작업 디렉터리의 위치를 바꾸는 명령 줄이다. 유닉스 셸 스크립트와 윈도, 도스의 배치 파일에서 모두 사용할 수 있다.



유닉스 계통 시스템의 파일 시스템의 사용자 보기는 ~로 축약되는 홈 디렉터리로 시작한다. 여기서, 트리는 더 많은 하부 디렉터리와 파일로 뻗어나갈 수 있다.




목차





  • 1 사용법


  • 2 옵션

    • 2.1 유닉스에서의 옵션


    • 2.2 도스에서의 옵션



  • 3 동작 방식


  • 4 참조




사용법


디렉터리는 파일을 관리하는 데 쓰이는 파일 시스템의 논리적인 부분이다. 디렉터리는 또한 다른 디렉터리를 가지고 있을 수 있다. cd 명령어는 하위 디렉터리로 변경되는 데 사용될 수 있고, 부모 디렉터리로 돌아갈 수도 있으며, 완전히 루트 디렉터리 (유닉스의 경우 /, 도스의 경우 )로 이동할 수 있다.


text.txt라는 파일과 세 개의 하부 디렉터리를 가진 사용자의 홈 디렉터리("~"로 표시되는)를 보여 주는 유닉스 파일 시스템의 하부 섹션이 있다고 하자(오른쪽 위 그림 참조).


사용자의 현재 작업 디렉터리가 홈 디렉터리("~")인 경우, "cd games"에 이어 명령어 "ls"를 입력하면 다음과 같은 메시지를 만들어 낸다:


 me@host:~$ ls
workreports games encyclopedia text.txt
me@host:~$ cd games
me@host:~/games$

사용자는 이제 "games" 디렉터리에 있게 된다.


도스에서 비슷한 세션이 있으며(버전에 따라 홈 디렉터리의 개념이 적용되지 않을 수도 있지만) 다음과 같다.:


 C:> dir
workreports <DIR> Wed Oct 9th 9:01
games <DIR> Tue Oct 8th 14:32
encyclopedia <DIR> Mon Oct 1st 10:05
text txt 1903 Thu Oct10th 12:43
C:> cd games
C:games>


옵션



유닉스에서의 옵션


유닉스의 버전에 따라 아래의 옵션이 달라질 수 있다.


  • -p

  • 출력에서 -l, '~', 또는, '~name'

  • -n

  • -v


도스에서의 옵션


도스의 버전에 따라 아래의 옵션이 달라질 수 있다.


  • CD .. : 상위 디렉터리로 이동한다.

  • CD  : 루트 디렉터리로 이동한다.

  • /D : 드라이브까지 변경된다.


동작 방식


cd는 명령 줄 인터프리터를 통해 만들어진 명령어이다. 명령 줄 인터프리터는 이를테면 대부분의 유닉스 셸(본 셸, tsch, 배시 등), 윈도의 cmd.exe 및 윈도 파워 셸, 도스의 COMMAND.COM를 들 수 있다.



참조



  • (영어) cd(1) – 리눅스 사용자 명령어 매뉴얼 페이지

  • (영어) cd – 명령어와 유틸리티 오픈 그룹의 단일 유닉스 규격, Issue 7 참고










원본 주소 "https://ko.wikipedia.org/w/index.php?title=Cd_(명령어)&oldid=22036944"










둘러보기 메뉴

























(window.RLQ=window.RLQ||[]).push(function()mw.config.set("wgPageParseReport":"limitreport":"cputime":"0.168","walltime":"0.224","ppvisitednodes":"value":536,"limit":1000000,"ppgeneratednodes":"value":0,"limit":1500000,"postexpandincludesize":"value":46024,"limit":2097152,"templateargumentsize":"value":716,"limit":2097152,"expansiondepth":"value":11,"limit":40,"expensivefunctioncount":"value":1,"limit":500,"unstrip-depth":"value":0,"limit":20,"unstrip-size":"value":0,"limit":5000000,"entityaccesscount":"value":0,"limit":400,"timingprofile":["100.00% 108.991 1 -total"," 24.23% 26.408 1 틀:토막글"," 23.23% 25.314 2 틀:언어링크"," 21.92% 23.895 1 틀:윈도우_명령어"," 20.40% 22.239 4 틀:언어_이름"," 19.04% 20.755 2 틀:둘러보기_상자"," 16.82% 18.331 1 틀:이름공간_검출"," 16.21% 17.666 1 틀:유닉스_명령어"," 11.89% 12.963 2 틀:Man"," 10.02% 10.918 2 틀:Man/format"],"scribunto":"limitreport-timeusage":"value":"0.026","limit":"10.000","limitreport-memusage":"value":1477202,"limit":52428800,"cachereport":"origin":"mw1329","timestamp":"20190320011126","ttl":2592000,"transientcontent":false);mw.config.set("wgBackendResponseTime":144,"wgHostname":"mw1268"););

Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?