Delete batch of root directory files found in file search
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I guess changing ALL files owner to andy instead of root is a bad idea ?
Yes it is.
Why don't you just run gnome-search-tool or your chosen search program as root (e.g. gksudo gnome-search-tool)?
That way you will have the permissions to delete any files that you find after selecting them using ctrl/shift-click and then using right click to show the context menu.
by root directories i guess you mean files in system directories like /etc?
let's take a step back:
0. which files and why delete them?
1. wait for an answer on LQ
2. if you really need to delete them, don't use any graphical app for that. use the terminal + sudo. preferably without any wildcards or '-r' switches. this is not a strict requirement, just common sense.
A "Power of Positive Thinking" 'affirmation' (in light of recent rm/tor/sudoers talk),
to quote from (paraphrase) a famous syg00LQguru signature:
I know you have a verified B-A-C-K-U-P, and ?drill?ed a perfect restore plan. Safe&secure.
I use CLI utilities (find/locate[updatedb]/even `file` cmd) to make a list of files I want to operate on, then carefully read thru that list, to be '100% sure' those are files I want to 'operate' on. A side benefit (to me) is that I get to learn some interesting `find` options, use vi :%s/^/rm /, and even a little scripting. The key that makes all this 'playing' 'safe' is that: I'm just collecting a list of filenames into a txt file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.