dirnames with spaces in changes-exit.conf

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
User avatar
abelM
Black ninja
Black ninja
Posts: 33
Joined: 22 Oct 2017, 12:35
Distribution: Porteus v-3.2.2 64 bit
Location: Argentina
Contact:

dirnames with spaces in changes-exit.conf

Post#1 by abelM » 31 Oct 2017, 18:44

Hi all!

I've added a line to /etc/changes-exit.conf to avoid saving cache from palemoon at shutdown -- using changes=EXIT: in the command line.

Code: Select all

!/home/guest/.cache/moonchild productions
The issue is the folder isn't deleted. I've tried with different directory names and it seems Porteus doesn't delete them when there are spaces in their names.

Something alike happens if you add a line like this to /etc/changes-exit.conf -- though it's an unusual case I think.

Code: Select all

/root/My files
In this case the folder isn't saved between sessions.

Any idea?

Regards,
Last edited by abelM on 02 Nov 2017, 11:59, edited 1 time in total.

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

removing and saving dirnames with spaces at EXIT

Post#2 by Ed_P » 31 Oct 2017, 20:32

Try using a "?" in place of the " ".

Other options that should work are:
using an "*" in place of the " ".
putting quotes around the name with spaces.

This posting may help: Re: How to delete files? Files with spaces in their names. (Post by Ed_P #28192)
Ed

User avatar
abelM
Black ninja
Black ninja
Posts: 33
Joined: 22 Oct 2017, 12:35
Distribution: Porteus v-3.2.2 64 bit
Location: Argentina
Contact:

dirnames with spaces in changes-exit.conf

Post#3 by abelM » 01 Nov 2017, 13:31

Hi Ed,

These do the job:

Code: Select all

# /etc/changes-exit.conf
!/home/guest/.cache/moonchild?productions
!/home/guest/.cache/moonchild*productions
But these don't:

Code: Select all

# /etc/changes-exit.conf
!/"home/guest/.cache/moonchild productions"
!/home/guest/.cache/moonchild\ productions
It seems a matter of word splitting. Using wildcards to replace blank spaces in dirnames are a simple an effective way to work it out.

I've followed the link you've suggested. Interesting. It goes into another issue -- that is how to permanently delete files in the aufs filesystem. But that's another post I think.

Thank you!

Post Reply