반응형

파일이나 폴더를 삭제하려고 할 때 아래와 같이 'XXX에서 열려 있어 작업을 완료 할 수 없다'는 메세지가 나오는 경우가 있다.

파일이 사용 중이기 때문에 삭제할 수 없다.

물론 이런 경우 대부분 엑셀을 종료하면 간단히 해결 할 수 있지만 간혹 엑셀이 종료되었는데도 파일을 삭제할 수 없는 상황이 발생하기도 한다. 파일(폴더)의 핸들을 어디선가 다른 프로세스가 잡고 있기 때문이다.

 

간단히 비슷한 상황을 만들어 해결책을 알아보자.

 

삭제하고 싶은 폴더(Target)를 만들고 안에 파일 하나를 생성한다.

 

생성된 파일을 열어준다.

 

폴더(Target) 삭제를 시도한다. 폴더 내 파일이 사용 중이기 때문에 실패한다.

물론 우리는 메모장(notepad)이 파일을 잡고 있다는걸 알지만 여기서는 메모장의 상황은 모르는걸로 가정하자.

 

 

어떤 프로그램이 폴더(Target)를 사용 하는지 알아내기 위해 프로세스 익스플로러를 실행하고 Find - Find Handle or DLL...을 선택한다.

 

찾고 싶은 이름(target)을 입력하고 Search 버튼을 클릭한다.

'target' 문자열이 들어가는 이름의 핸들을 잡고 있는 프로세스를 모두 찾아준다. 위 예에선 우리가 삭제하고자 하는 'G:\Test\Target'을 notepad.exe 프로세스가 잡고 있는걸 확인 할 수 있다. 클릭한다.

 

notepad.exe 프로세스가 소유한 파일 핸들 중 'G:\Test\Target'이 있다.

어떤 프로세스가 핸들을 잡고 있는지 알아냈으므로 그 프로세스를 종료시키거나 다른 작업을 통해 핸들을 반환하도록 할 수 있다.

 

※ 참고

Process Explorer

 

반응형
Posted by J-sean
:
반응형

Everything에는 http server, ftp server를 만들 수 있는 기능이 있다. http server를 이용해 간단히 원하는 파일이나 폴더를 공유해 보자. (ftp server도 거의 비슷한 방법으로 만들 수 있다)

 

Everything이 설치되어 있다.

 

Options...를 클릭한다.

 

HTTP Server를 선택한다. (ETP/FTP Server도 비슷한 방식으로 만들면 된다)

 

Enable HTTP server를 선택하고 Username과 Password를 입력한다.

 

 

Indexes - Exclude를 선택한다.

 

Enable exclude list를 선택하고 Add Folder... 버튼을 클릭해 공유(검색)에서 제외할 폴더나 드라이브를 선택한다.

 

Apply 버튼과 OK 버튼을 클릭한다.

 

인터넷 브라우저 주소창에 localhost를 입력한다.

 

 

아니면 127.0.0.1을 입력하고 사용자이름과 비밀번호를 입력한다.

 

제외된 C~H 드라이브 빼고 I 드라이브만 표시된다.

 

검색창에 폴더명이나 파일명을 입력해서 찾을 수 도 있다.

 

공유기를 사용한다면 포트포워드 설정으로 외부에서도 파일을 공유할 수 있다.

 

 

Options - Indexes - NTFS - Settings for XXX - Include in database 에서 공유(검색) 드라이브를 추가하거나 제외할 수 도 있다.

 

필요하다면 subst 명령으로 원하는 폴더를 드라이브로 지정하고 그 드라이브만 database에 추가해서 공유한다.

 

반응형
Posted by J-sean
:
반응형

Samba is the standard Windows interoperability suite of programs for Linux and Unix.

Since 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.


This post describes how to create a public share on Samba in Fedora Linux.


Samba를 이용해 윈도우에서도 접속 가능한 리눅스 공유 폴더를 간단히 만들 수 있다. 사용자 이름이나 암호 없이 접속 가능한 간단한 공유 폴더를 만들어 보자.


Download and install Samba package.


Edit '/etc/samba/smb.conf'


Add the following in [global].

netbios name = sean

map to guest = Bad User


Make [share] at the end and add the following in it.

path = /share

public = yes

writable = yes


Run 'testparm' and check 'smb.conf'.


Move to the root directory and make a directory you want to share.

The name of the sharing directory has to be the same as the name you assigned to 'path' in 'smb.conf' [share].


※ 'share' has read and execute permissions only for 'other'. So if you access it as an 'other', you can't write to it unless you give write permission to 'other'. (chmod 777 share)



Add Samba service to the firewall and reload it.


Start and enable Samba. To start services automatically at boot, you must enable them.


Run 'File Explorer' in Windows and access to the sharing directory in Linux by its IP address.


You can also access the directory by the name you assigned to 'netbios name' in 'smb.conf' [global]


반응형
Posted by J-sean
: