Deleting files with shell

Status
Not open for further replies.

elangley

Contributor
Joined
Jun 4, 2012
Messages
109
Unfortunately I have a full volume with no snapshots. I need to delete a file to regain access to the volume.

I read this post, but am having an issue with the echo command syntax.

My volume structure is: vol1/dataset1/dataset2

I am running the following command;
echo > /vol1/dataset1/dataset2/FolderNAME/FILEname

I receive the response; "No such file or directory".

What might I check for?

~eric
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Is vol1 actually mounted at /mnt/vol1?

try echo > /mnt/vol1/dataset1/dataset2/FolderNAME/FILEname
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
This is somewhat confusing. Why not just delete the problem file rather than overwriting it? I confess I did not read that whole long and disjointed thread.

Remember that Unix is case-sensitive and uses forward slashes instead of the backwards Windows backslashes.
First, verify that the path to the file is correct: ls /vol1/dataset1/dataset2/FolderNAME/FILEname
If that does not show an error, then delete that file: rm /vol1/dataset1/dataset2/FolderNAME/FILEname
 

elangley

Contributor
Joined
Jun 4, 2012
Messages
109
This is somewhat confusing. Why not just delete the problem file rather than overwriting it? I confess I did not read that whole long and disjointed thread.

Remember that Unix is case-sensitive and uses forward slashes instead of the backwards Windows backslashes.
First, verify that the path to the file is correct: ls /vol1/dataset1/dataset2/FolderNAME/FILEname
If that does not show an error, then delete that file: rm /vol1/dataset1/dataset2/FolderNAME/FILEname

Because rm does not work when the pool is full.
 
Status
Not open for further replies.
Top