본문 바로가기

프로그래밍105

[Linux, Ubuntu] 파일 속성 보는 방법 (파일 크기, 생성 시간, 수정 시간) - stat [옵션 또는 파일 이름] ubuntu@ubuntu-VirtualBox:~$ stat test.db File: test.db Size: 32768 Blocks: 64 IO Block: 4096 regular file Device: 805h/2053dInode: 3936052 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ ubuntu) Gid: ( 1000/ ubuntu) Access: 2021-03-25 12:05:32.531009839 +0900 Modify: 2021-03-25 10:47:08.260042693 +0900 Change: 2021-03-25 10:47:08.260042693 +0900 Birth: - Size : 파일 크기 (바이트, b.. 2021. 5. 9.
[Linux, Ubuntu] 파일 검색하는 방법, 특정 파일 찾아서 삭제하기 (find) ○ 파일 검색 1. find [검색 시작 위치] [검색 옵션] 2. 사용 예 - 특정 파일 검색 (test.tgz 파일 찾기) find . -name test.tgz - 특정 글자를 포함하는 파일 또는 폴더 검색 (test로 시작하는 파일 검색) find . -name test* -type f * 옵션 > test* : test로 시작하는 경우 > *test : test 문자가 뒤에 붙은 경우 -type f : 파일 타입 -type d : 디렉토리 타입 (폴더) - 확장자가 tgz 파일 검색 (또는 find . -name "*.tgz") find . -name *.tgz - 파일 이름이 test를 포함하고 확장자가 tgz인 파일 검색 find . -name test* -a -name *.tgz - 파일 .. 2021. 5. 9.
[Linux, Ubuntu] IP, Mac 주소 확인, 변경하는 방법 (네트워크 인터페이스, NIC) ○ 테스트 환경 1. 버추얼 박스 - 우분투 (20 LTS) ○ IP, Mac 주소 확인하는 방법 (ifconfig) 1. 터미널 찾을 열고 ifconfig를 입력. 2. ifconfig가 없을 경우 sudo apt-get install ifconfig를 통해 설치. ubuntu@ubuntu-VirtualBox:~$ ifconfig enp0s3: flags=4163 mtu 1500 inet 192.168.0.43 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::4bf:bc22:aed4:e75a prefixlen 64 scopeid 0x20 ether 08:00:27:22:4b:21 txqueuelen 1000 (Ethernet) RX packets .. 2021. 5. 9.
[C#, WPF] 파일 선택 다이얼로그 여는 방법 이번에는 파일 선택 다일로그를 여는 방법에 대해서 알아보도록 할게요. - 소스 코드 System.Windows.Forms.OpenFileDialog dialog = new System.Windows.Forms.OpenFileDialog(); dialog.Filter = "JPEG|*.jpg;*.jpeg|All files(*.*)|*.*"; if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Debug.WriteLine(dialog.FileName); } else { return; } - 실행 결과 E:\제목 없음.jpg dialog.Filter에 파일 필터를 넣어 해당 확장자를 가진 파일만 선택가능하게 설정할 수 있어요. - 이름|확장명.. 2021. 4. 4.