How to delete files? Files with spaces in their na [Solved]
- Ed_P
- Contributor
- Posts: 7671
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
How to delete files? Files with spaces in their na [Solved]
Ok, I had 2 .wav files with a space in their names. So I renamed them. I had a shortcut from a module that i don't use that had a space in it's name so I deleted it.
I reboot, the shortcut is back and so too are the .wav files with the space in their names.
OK, been here before, a problem with .wh. files. I reboot to Always Fresh mode, manually delete the 3 .wh. files associated with the 3 files. I reboot to my normal changes=EXIT mode and t h e y a r e a l l b a c k !!!!
I'm running 3.0.1 which I thought resolved the .wh. file problem so what to do now? Will the Porteus save file manager's recover a savefile option fix the problem? Will deleting all the save.dat file's .wh. files fix the problem? (I have LOTS of FireFox and Java .wh. files which I don't care about and don't seem to be causing any problems.)
I reboot, the shortcut is back and so too are the .wav files with the space in their names.
OK, been here before, a problem with .wh. files. I reboot to Always Fresh mode, manually delete the 3 .wh. files associated with the 3 files. I reboot to my normal changes=EXIT mode and t h e y a r e a l l b a c k !!!!
I'm running 3.0.1 which I thought resolved the .wh. file problem so what to do now? Will the Porteus save file manager's recover a savefile option fix the problem? Will deleting all the save.dat file's .wh. files fix the problem? (I have LOTS of FireFox and Java .wh. files which I don't care about and don't seem to be causing any problems.)
Last edited by Ed_P on 05 Oct 2014, 04:46, edited 1 time in total.
Ed
Re: How to delete files? Files with spaces in their names.
Hello Ed_P
New to Porteus but, Any chance you would need to do it from root ? Maybe rename and leave off the file extension and then use the shred command ?
I'm bad at leaving spaces where they don't belong but haven't had your problem yet. I need to stop doing that I guess.
New to Porteus but, Any chance you would need to do it from root ? Maybe rename and leave off the file extension and then use the shred command ?
I'm bad at leaving spaces where they don't belong but haven't had your problem yet. I need to stop doing that I guess.
- brokenman
- Site Admin
- Posts: 6104
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
- Contact:
Re: How to delete files? Files with spaces in their names.
rm "/tmp/my file with spaces.txt"How to delete files? Files with spaces in their names
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- Ed_P
- Contributor
- Posts: 7671
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: How to delete files? Files with spaces in their names.
Code: Select all
guest@porteus:~$ cd Sounds
guest@porteus:~/Sounds$ ls
Alien_Siren-KevanGC-610357990.wav
Busy\ Signal-SoundBible.com-1695161320.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster\ Crowing-SoundBible.com-43612401.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~/Sounds$ rm "Busy\ Signal-SoundBible.com-1695161320.wav"
rm: cannot remove ‘Busy\\ Signal-SoundBible.com-1695161320.wav’: No such file or directory
guest@porteus:~/Sounds$ rm "Busy Signal-SoundBible.com-1695161320.wav"
guest@porteus:~/Sounds$ rm "Rooster Crowing-SoundBible.com-43612401.wav"
guest@porteus:~/Sounds$ ls
Alien_Siren-KevanGC-610357990.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~/Sounds$

-- rebooted --
Code: Select all
guest@porteus:~$ cd Sounds
guest@porteus:~/Sounds$ ls
Alien_Siren-KevanGC-610357990.wav
Busy\ Signal-SoundBible.com-1695161320.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster\ Crowing-SoundBible.com-43612401.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~/Sounds$

=update=
Always Fresh mode
Code: Select all
guest@porteus:~$ rm /mnt/loop/home/guest/Sounds/.wh.*
rm: remove write-protected regular empty file ‘/mnt/loop/home/guest/Sounds/.wh.Busy Signal-SoundBible.com-1695161320.wav’? yes
rm: remove write-protected regular empty file ‘/mnt/loop/home/guest/Sounds/.wh.Rooster Crowing-SoundBible.com-43612401.wav’? yes
guest@porteus:~$ rm /mnt/loop/home/guest/.wh.PlayOnLinux*
rm: remove write-protected regular empty file ‘/mnt/loop/home/guest/.wh.PlayOnLinux's virtual drives’? yes
guest@porteus:~$ uloop
Password:
/mnt/loop has been unmounted
guest@porteus:~$
Code: Select all
guest@porteus:~$ ls Sounds
Alien_Siren-KevanGC-610357990.wav
Busy\ Signal-SoundBible.com-1695161320.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster\ Crowing-SoundBible.com-43612401.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~$

I haven't had to rebuild my save.dat file in a long time but I don't see any other fix at this point. Something is broken somewhere.
Ed
- Slaxmax
- Contributor
- Posts: 408
- Joined: 03 Jan 2013, 09:51
- Distribution: KDE4
- Location: Campinas Brazil https://goo.gl/yrxwKi
Re: How to delete files? Files with spaces in their names.
you need use chattr -i before remove file.
example
example
Code: Select all
root@porteus:/mnt/sda2# chattr -i /mnt/sda2/index.html
root@porteus:/mnt/sda2# rm /mnt/sda2/index.html
“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead
― Bill Gates, The Road Ahead
Re: How to delete files? Files with spaces in their names.
...
Last edited by phhpro on 04 Feb 2016, 02:00, edited 1 time in total.
- Ed_P
- Contributor
- Posts: 7671
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: How to delete files? Files with spaces in their names.
File Properties for the .wav files shows:
Owner: guest
Group: guest
Owner: Read, Write
Group: Read
Other: Read
However for the PlayOnLinux file it shows:
Owner: root
Group: root
Owner: Read, Write, Execute
Group: Read, Write, Execute
Other: Read, Write, Execute
These latter properties are a bit of a shock!! Why don't I receive Access Denied errors when I try to delete it???
== reboot ==
The PlayOnLinux one also.
Thanks for the suggestions guys.
Owner: guest
Group: guest
Owner: Read, Write
Group: Read
Other: Read
However for the PlayOnLinux file it shows:
Owner: root
Group: root
Owner: Read, Write, Execute
Group: Read, Write, Execute
Other: Read, Write, Execute
These latter properties are a bit of a shock!! Why don't I receive Access Denied errors when I try to delete it???
Code: Select all
guest@porteus:~$ ls Sounds
Alien_Siren-KevanGC-610357990.wav
Busy\ Signal-SoundBible.com-1695161320.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster\ Crowing-SoundBible.com-43612401.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~$ chattr -i "Sounds/Busy Signal-SoundBible.com-1695161320.wav"
chattr: Inappropriate ioctl for device while reading flags on Sounds/Busy Signal-SoundBible.com-1695161320.wav
guest@porteus:~$ rm "Sounds/Busy Signal-SoundBible.com-1695161320.wav"
guest@porteus:~$ ls Sounds
Alien_Siren-KevanGC-610357990.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster\ Crowing-SoundBible.com-43612401.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~$ su
Password:
root@porteus:/home/guest# rm "Sounds/Rooster Crowing-SoundBible.com-43612401.wav"
root@porteus:/home/guest# ls Sounds
Alien_Siren-KevanGC-610357990.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster_Crowing-SoundBible.com-43612401.wav
root@porteus:/home/guest# rm PlayOnLinux*
root@porteus:/home/guest#
Code: Select all
guest@porteus:~$ ls Sounds
Alien_Siren-KevanGC-610357990.wav
Busy\ Signal-SoundBible.com-1695161320.wav
Busy_Signal-SoundBible.com-1695161320.wav
Rooster\ Crowing-SoundBible.com-43612401.wav
Rooster_Crowing-SoundBible.com-43612401.wav
guest@porteus:~$

Thanks for the suggestions guys.

Ed
- Ed_P
- Contributor
- Posts: 7671
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: How to delete files? Files with spaces in their names.
rm /tmp/my*brokenman wrote:rm "/tmp/my file with spaces.txt"How to delete files? Files with spaces in their names
works also.

But if they are zombie files they keep coming back.

Ed
Re: How to delete files? Files with spaces in their names.
...
Last edited by phhpro on 04 Feb 2016, 01:58, edited 1 time in total.
- Ed_P
- Contributor
- Posts: 7671
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: How to delete files? Files with spaces in their na [Sol
Dumb, DUMB, DUMB!!!
The actual deleted files are in the save.dat file, not just their associated .wh. files.
To delete them once and for all one must delete the .wh. file AND the actual file from the save.dat file.
Good grief, how long did it take to figure this out?
The actual deleted files are in the save.dat file, not just their associated .wh. files.

To delete them once and for all one must delete the .wh. file AND the actual file from the save.dat file.

Good grief, how long did it take to figure this out?

Ed