unable to delete a file

Status
Not open for further replies.

Phoenixgg

Dabbler
Joined
May 27, 2012
Messages
16
Hi guys

I am having a problem. I cannot delete a file on my freenas. The file properties are set to "read only" and "achieve". I have tried to change these settings, but it informs me that I need administrative rights and cannot alter the file. I can move it around in folders, but I cannot delete it. When I try to delete it, I get an error message that the file is in use. Is there some way to force delete the file?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
first of all, what is the file extension? and/or filename?

secondly, you can delete anything you want from the command line on the FreeNAS box.
SSH into it,
cd /name/of/directory/containing/trouble/file
rm nameoffile.file
 

Phoenixgg

Dabbler
Joined
May 27, 2012
Messages
16
I tried to change the file and folder name to get it to delete. so currently is is in a "temp" folder and the files are temp1.avi and temp2.avi

I booted into the console and then selected option 9 for the shell
I then entered the following command and received the error, file or folder does not exist
cd /temp
cd/temp
rm cd/temp
rm cd/temp/temp1.avi
rm cd /temp
rm cd /temp/temp1.avi
cd/temp rm temp1.avi

I got the same error message for all of the above commands. I double checked the directory and file names. I also checked cases.
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
I had to double check this was a different person from the other thread.

I don't know where to begin.

Do you really have a directory /temp that has .avi's in it? I very much doubt it, as this would mean they're on the freenas boot drive.

It's much more likely the temp directory is in a zfs pool or something mounted under /mnt. Assuming your zpool is "tank", and assuming "temp" is a directory off of the pool, then this should work:

Code:
# cd /mnt/tank/temp
# rm temp1.avi
# rm temp2.avi


If you really don't know where the files are, try:
Code:
# find / -name temp1.avi
 
Status
Not open for further replies.
Top