CentOS: 리눅스 쉘 연습

CentOS로 리눅스 쉘 연습 중…

리눅스의 모든 것 All About Linux(서자룡 저, 청담북스)를 참고함.

clip_image001

7.2.1511 (Core 버전)으로 연습

버전 확인: $ grep . /etc/*-release

grep은 유닉스를 위해 만들어진 텍스트 검색 기능을 가진 명령어이다. 그 이름은 유닉스 ed의 명령어로 비슷한 기능을 수행하는 g/re/p에서 유래되었다.[3]

grep은 엄밀히 말하면 두문자어(머리글자로 된 말)은 아니지만 global / regular expression / print 에서 각각의 머릿글자를 따 온 것이며 이것은 ed 텍스트 편집기에서 쓰이는 연속적인 지시어이다. grep 명령어는 파일이나 표준 입력을 검색하여 주어진 정규 표현식과 맞는 줄을 찾아 프로그램의 표준 출력으로 출력한다.

출처: <https://ko.wikipedia.org/wiki/Grep>

——–디렉터리만 나열하기 ls

ls는 POSIX단일 유닉스 규격에 규정되어 있는 유닉스 계열 운영 체제명령어 가운데 하나로, ‘list segments’의 약자이며, 파일의 목록을 표시하는 기능을 수행하는 명령어이다. 도스에서의 dir과 유사한 명령어이다.

출처: <https://ko.wikipedia.org/wiki/Ls_(%EC%9C%A0%EB%8B%89%EC%8A%A4)>

Linux(Cent OS)에서

clip_image002

ls -al | grep “^d”

디렉터리만 ls 명령으로 나오게 함

Command Prompt에서

clip_image003

dir | find “<DIR>”

PowerShell에서

clip_image004

Get-ChildItem -Directory

———-디스크 용량 확인 df

df (abbreviation for disk free) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access. df is implemented using the statfs or statvfs system calls.

df first appeared in Version 1 AT&T UNIX.

출처: <https://en.wikipedia.org/wiki/Df_(Unix)>

CENTOS에서

clip_image005

df -h

-h: 쉬운 용량 단위 표기

clip_image006

-T: 파일 시스템 타입 보여줌

Command Prompt에서

clip_image007

https://www.reddit.com/r/commandline/comments/1mtadb/windows_command_line_equivalent_to_unixs_df_h/ 레딧에서 검색함

clip_image008

clip_image009

Microsoft is creating a lot of good reasons to make the command prompt in Windows XP and the Windows Server 2003 family your home for systems management. Windows Management Instrumentation Command-line (WMIC), which uses the power of Windows Management Instrumentation (WMI) to enable systems management from the command line, is one of those reasons.

출처: <https://msdn.microsoft.com/en-us/library/bb742610.aspx>

PowerShell에서

clip_image010

Get-WmiObject Win32_logicaldisk | Format-Table -auto

http://www.computerperformance.co.uk/powershell/powershell_wmi_disk.htm 참고

——-프로세스 상태 확인 ps

In most Unix-like operating systems, the ps program (short for “process status”) displays the currently-running processes. A related Unix utility named top provides a real-time view of the running processes.

In Windows PowerShell, ps is a predefined command alias for the Get-Process cmdlet, which essentially serves the same purpose.

출처: <https://en.wikipedia.org/wiki/Ps_(Unix)>

CENTOS

clip_image011

-l : 긴 포멧으로 출력

clip_image012

-u : 사용자와 실행 시간 표시

Command Prompt

clip_image013

tasklist

clip_image014

you might want to pipe it to the clipboard then paste into notepad: c:\>tasklist | clip – Keith Aug 25 ’11 at 21:04

출처: <http://superuser.com/questions/914782/how-do-you-list-all-processes-on-the-command-line-in-windows>

clip_image015

아니 이렇게 좋은 게 있었다니!

PowerShell

clip_image016

Get-Process

—-시스템을 사용 중인 사용자 확인

CENTOS

clip_image017

w

who

이것도 살펴보세요!

무비스트(Movist): 파인더에서 더블클릭해도 재생되지 않을 때

문제 없이 사용중이던 무비스트(Movist)가 갑자기 재생되지 않는 문제가 생겼다. 현재 사용중인 무비스트 버전은 2.9.5(138) 지금껏 …

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다