Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HOME directory cleanup #16

Open
beelux opened this issue Dec 30, 2021 · 1 comment
Open

Fix HOME directory cleanup #16

beelux opened this issue Dec 30, 2021 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@beelux
Copy link
Collaborator

beelux commented Dec 30, 2021

Problem

As explained in the file, the current "solution" is hacky at best and relies on pure luck:

# This command is known to fail because it tried to delete the current directory . and the previous directory .. so we force it with true (remote)

'rm -rf ~/* ~/.*; true'

It's only working because the permissions are just right, and it doesn't allow the user to delete . (current directory, HOME, /home/user) or .. (previous directory, /home/)

Wanted solution

How can we properly delete all files and directories (including hidden ones) that are in that (user's HOME) directory, without wanting to delete . or ..

@beelux beelux added bug Something isn't working enhancement New feature or request labels Dec 30, 2021
@beelux
Copy link
Collaborator Author

beelux commented Dec 30, 2021

dailybuild members on IRC suggested:

  • using find:
    find . ... -exec rm {} \; (maybe)

could u do a find . ... -exec rm {} ; ?
... is just the critera you want to 'find' on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant