사용자 도구

사이트 도구


windows:powershell

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
windows:powershell [2018/06/12 14:05]
kwon37xi [Color ls]
windows:powershell [2018/09/04 10:36]
kwon37xi
줄 6: 줄 6:
  
 ===== 기본 개인 profile 파일 ===== ===== 기본 개인 profile 파일 =====
 +  * [[https://technet.microsoft.com/en-us/library/bb613488(v=vs.85).aspx|Understanding profile]]
   * ''$PROFILE'' 환경변수 값으로 프로필 파일 생성<code>   * ''$PROFILE'' 환경변수 값으로 프로필 파일 생성<code>
 New-Item $profile -force -itemtype file New-Item $profile -force -itemtype file
줄 57: 줄 58:
 $Env:path = $env:path + ";c:\temp" $Env:path = $env:path + ";c:\temp"
 Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp") Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Temp")
 +
 +# 환경변수 목록
 +Get-ChildItem Env:
 </code> </code>
  
줄 76: 줄 80:
 # 매칭이 안되는 부분 찾기 # 매칭이 안되는 부분 찾기
 Select-String -Path "process.txt" -Pattern "idle, svchost" -NotMatch Select-String -Path "process.txt" -Pattern "idle, svchost" -NotMatch
 +</code>
 +  * rename - [[https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item?view=powershell-6|Rename-Item]]<code>
 +Rename-Item -Path old_name -NewName new_name [-Force]
 </code> </code>
 ===== curl ===== ===== curl =====
줄 81: 줄 88:
   * ''$profile'' 파일에 PowerShell에 자체 ''curl'' alias를 지워야 실제 ''curl'' 명령이 실행된다.<code>   * ''$profile'' 파일에 PowerShell에 자체 ''curl'' alias를 지워야 실제 ''curl'' 명령이 실행된다.<code>
 remove-item alias:curl remove-item alias:curl
 +</code>
 +
 +===== wget =====
 +  * ''wget'' 명령은 ''Invoke-WebRequest''의 alias 이다. [[https://superuser.com/questions/362152/native-alternative-to-wget-in-windows-powershell|Native alternative to wget in Windows PowerShell?]]
 +
 +<code sh>
 +wget http://blog.stackexchange.com/ -OutFile out.html
 </code> </code>
  
windows/powershell.txt · 마지막으로 수정됨: 2024/03/05 13:00 저자 kwon37xi