UNIX rm -rf error "rm: cannot remove `filename' : Device or resource busy"


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers UNIX rm -rf error "rm: cannot remove `filename' : Device or resource busy"
# 8  
Old 05-23-2011
The answer!

Thanks for the help everybody! I am posting the how I got it working for anyone else in a similar situation.

Apparently I had processes that were still running so I used the "lsof" (list open files) command to list the commands and the PID
Code:
$ /usr/sbin/lsof +D /path/to/problem/directory/

USER        PID ACCESS COMMAND
/path/to/problem/directory/:
                    zdepski   13298 ..c.. less
                    zdepski   13323 ..c.. less
                    zdepski   25997 ..c.. bash
                    zdepski   30070 ..c.. watch

then I killed the jobs. However the regular "kill" command wasn't enough and I used

Code:
$ kill -s SIGKILL 13298
$ kill -s SIGKILL 13323

How and why I had less commands that were "still running".... I don't know? I guess I didn't exit the terminal or "less" properly?

Thanks,
Anna
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to remove a LUN in "Online Busy" state?

Hi all, I have a LUN that is in "Online Busy" when I issue the dev_gestate subcommand of luxadm: root@es088wb6:~# luxadm -v -e dev_getstate /dev/rdsk/c21t50050763090887FEd4s2 phys path = "/devices/pci@6c0/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/ssd@w50050763090887fe,4:c,raw" ... (5 Replies)
Discussion started by: ludiegu
5 Replies

2. SCO

NFS umount shows the "Device busy (Error 16)"

Hi there After making a backup copy of it sometimes happens that when I want to unmount an NFS indicates the error:umount: /path_mount busy: Device busy (Error 16) if I run lsoff, I can not find the process that is blocking the application. I'm using OpenServer 5.0.2c as one NFS server ... (14 Replies)
Discussion started by: flako
14 Replies

3. Solaris

"Device busy" When Reopening Serial Port

Any help much appreciated. I am a Java developer, not a Solaris adept. I'm having an issue reopening serial port with the Java app I am developing. I develop in Windows and deploy the app on Solaris 10 (Sunfire X4170 with Xeon.) On the target machine my app uses the two serial ports... (11 Replies)
Discussion started by: Jim Ryan
11 Replies

4. UNIX for Advanced & Expert Users

lvm swapon failed Device or resource busy

Is there a trick to mounting swap in n a lvm? I can't get it to work. # swapon -va swapon on /dev/mapper/VG-lv_swap swapon: /dev/mapper/VG-lv_swap: found swap signature: version 1, page-size 4, same byte order swapon: /dev/mapper/VG-lv_swap: pagesize=4096, swapsize=4294967296,... (1 Reply)
Discussion started by: cokedude
1 Replies

5. UNIX for Dummies Questions & Answers

"tail -n 1 filename" error while "head -n 1 filename" is ok?

Hi all, I was wondering why tail -n 2 filename produce an error when I manage to do similar command on head -n 2 filename SunOS{type8code0}: tail -n 2 filename usage: tail ] tail ] (2 Replies)
Discussion started by: type8code0
2 Replies

6. Hardware

/dev/ttyS0: Device or resource busy

hello to everybody I have Ubuntu Lucid 10.04 installed on my Desktop and I have a PCI serial card in my computer and it has only one serial port. Actually I want to use this serial port for the serial communication and for that I executed this command : $ setserial -g /dev/ttyS and I... (0 Replies)
Discussion started by: piyush011
0 Replies

7. UNIX Desktop Questions & Answers

cygwin error device or resource busy

Hello!!! My problem is: i'm trying to send At commands from Pc to mobile phone using bluetooth and cygwin and i would like to read the device's answers on the shell bash. And so, i open two terminals in this way: xterm & In the first i write: cat /dev/ttyS2 because the device is... (9 Replies)
Discussion started by: blianna
9 Replies

8. UNIX and Linux Applications

/dev/ttyS2 device or resource busy

Ciao a tutti!!! il mio problema è questo: sto cercando di inviare dei comandi AT da PC a cellulare utilizzando il bluetooth e cygwin e vorrei visualizzare le risposte nella shell bash. Per farlo apro due terminali utilizzando le seguente istruzioni: xterm & Sul primo scrivo cat /dev/ttyS2 ... (1 Reply)
Discussion started by: blianna
1 Replies

9. UNIX Desktop Questions & Answers

cygwin /dev/ttyS2: Device or resource busy

Ciao a tutti!!! il mio problema è questo: sto cercando di inviare dei comandi AT da PC a cellulare utilizzando il bluetooth e cygwin e vorrei visualizzare le risposte nella shell bash. Per farlo apro due terminali utilizzando le seguente istruzioni: xterm & Sul primo scrivo cat /dev/ttyS2 ... (0 Replies)
Discussion started by: blianna
0 Replies

10. UNIX for Dummies Questions & Answers

Device or resource busy??

Hi, I'm trying to do a sharity mount to mount a terastation network drive. I'm getting a Device or resource busy message after my mount command. Please see output below... # /usr/local/sharity3/bin/sharity mount smb://labbackup01/bakup_data /mnt/labbackup01 Device or resource busy.... (2 Replies)
Discussion started by: orahi001
2 Replies
Login or Register to Ask a Question