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

rm *.extension or file* deletes all files #10

Closed
codebam opened this issue Jun 4, 2016 · 14 comments
Closed

rm *.extension or file* deletes all files #10

codebam opened this issue Jun 4, 2016 · 14 comments

Comments

@codebam
Copy link

codebam commented Jun 4, 2016

No description provided.

@codebam
Copy link
Author

codebam commented Jun 4, 2016

and now I need to download all my music again...

@fandreuz
Copy link
Owner

fandreuz commented Jun 4, 2016

Linux shell works in the same way. I'm sorry for what happened to your music

@licaon-kter
Copy link
Contributor

@codebam So if you execute rm MusicAAA.* and the file MusicBBB.mp3 gets deleted?
If so @Andre1299 that's a bug, the Linux shell does not work like that.

@fandreuz
Copy link
Owner

fandreuz commented Jun 4, 2016

I didn't understand the problem was that. I'm sorry, I'll solve this in the next release. Indeed, I'm very sorry for your music

@codebam
Copy link
Author

codebam commented Jun 6, 2016

Yeah the problem was that anything prefixed with or at the end of with a * deleted all files in the current directory without warning. So another bug should be not to allow folder deletion without the -r flag, and only do it without prompt with -rf. Also, @licaon-kter not exactly sure what you were trying to say. I executed rm *.log which should have removed all the log files in the root of /sdcard, instead it deleted all files and folders inside /sdcard. No problem about the music @Andre1299, I can't really blame you since I was the one who ran the command knowing it might not be stable.

@licaon-kter
Copy link
Contributor

@codebam That what I said, you try to remove a file and another file is deleted too. See AAA and BBB ;)

@fandreuz
Copy link
Owner

fandreuz commented Jun 6, 2016

It will be solved in next build

@HassanHeydariNasab
Copy link

Are you using different code than linux binary rm?

@fandreuz
Copy link
Owner

fandreuz commented Jun 7, 2016

@HassanHeydariNasab
Copy link

in 4.3.b1 rm foo* doesn't work (File not found) but rm *bar works.
Can you explain why you had to use your own rm code?

@fandreuz
Copy link
Owner

actually, you can't do this. maybe in next versions. you are able to do only
rm filename.* ---> delete all files with name "filename"
rm *.mp3 ---> delete all files with extension "mp3"

I need to use custom rm code to be able to use useful things like suggestions and custom directory positions

@HassanHeydariNasab
Copy link

What's your work different than passing arguments to rm linux binary?

Do the suggestions,... here:

rm -abc foo

and do this:
cd $dir && rm -abc foo

@fandreuz
Copy link
Owner

ok

On Fri, Jun 10, 2016, 4:39 PM Hysyn Hejdyri Nysyb notifications@github.com
wrote:

What's your work different than passing arguments to rm linux binary?

Do the suggestions,... here:

rm -abc foo

and do this:
cd $dir && rm -abc foo


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AIEn1sswxA06RliBmwa50S032is3k5ozks5qKXcEgaJpZM4IuAwz
.

@codebam
Copy link
Author

codebam commented Jun 12, 2016

I think rewriting the rm command would be a bad idea, at that point you are sort of just rewriting the tools that are already there. The rm command has advanced options that aren't as simple as just removing a file. Why not pass the full typed string to the real rm command in the background and display its output by adding &> /data/local/tmp/tui-console_out to the end of the string you're passing? Just an idea, it's your app of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants