How to delete files? Files with spaces in their na [Solved]

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

How to delete files? Files with spaces in their na [Solved]

Post#1 by Ed_P » 27 Sep 2014, 16:01

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.)
Last edited by Ed_P on 05 Oct 2014, 04:46, edited 1 time in total.
Ed

THX2006
White ninja
White ninja
Posts: 15
Joined: 26 Sep 2014, 00:16
Distribution: Porteus LXDE
Location: U.S.

Re: How to delete files? Files with spaces in their names.

Post#2 by THX2006 » 27 Sep 2014, 18:20

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.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: How to delete files? Files with spaces in their names.

Post#3 by brokenman » 27 Sep 2014, 21:01

How to delete files? Files with spaces in their names
rm "/tmp/my file with spaces.txt"
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to delete files? Files with spaces in their names.

Post#4 by Ed_P » 27 Sep 2014, 21:38

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$ 
And no error msgs indicating I need root to access them. :)

-- 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$ 
Didn't work. :wall:

=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:~$ 
== rebooted ==

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:~$ 
:evil:

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

User avatar
Slaxmax
Contributor
Contributor
Posts: 403
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.

Post#5 by Slaxmax » 27 Sep 2014, 22:51

you need use chattr -i before remove file.

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

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: How to delete files? Files with spaces in their names.

Post#6 by phhpro » 28 Sep 2014, 03:51

...
Last edited by phhpro on 04 Feb 2016, 02:00, edited 1 time in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to delete files? Files with spaces in their names.

Post#7 by Ed_P » 28 Sep 2014, 05:08

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???

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# 
== reboot ==

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:~$
The PlayOnLinux one also. :sorry:

Thanks for the suggestions guys. :beer:
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to delete files? Files with spaces in their names.

Post#8 by Ed_P » 28 Sep 2014, 23:21

brokenman wrote:
How to delete files? Files with spaces in their names
rm "/tmp/my file with spaces.txt"
rm /tmp/my*

works also. :wink:


But if they are zombie files they keep coming back. :shock:
Ed

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: How to delete files? Files with spaces in their names.

Post#9 by phhpro » 29 Sep 2014, 02:33

...
Last edited by phhpro on 04 Feb 2016, 01:58, edited 1 time in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to delete files? Files with spaces in their names.

Post#10 by Ed_P » 05 Oct 2014, 04:45

Built a new save.dat file.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3328
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to delete files? Files with spaces in their na [Sol

Post#11 by Ed_P » 15 Oct 2014, 04:29

Dumb, DUMB, DUMB!!!

The actual deleted files are in the save.dat file, not just their associated .wh. files. :shock:

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

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

Post Reply