LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-07-2017, 12:42 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Delete batch of root directory files found in file search


I generally use Mate Search to find files.

Sometimes it finds files in root directories.

Is there a way to delete a whole set ?

Now I have to run thunar as root and manually delete them one at a time which is time consuming.

I also have Catfish file finder as well.

I guess changing ALL files owner to andy instead of root is a bad idea ?

Last edited by Fixit7; 01-07-2017 at 12:44 PM.
 
Old 01-07-2017, 01:23 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Fixit7 View Post
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.

Naturally, be careful if deleting system files.
 
Old 01-09-2017, 03:31 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
Old 01-09-2017, 06:46 PM   #4
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Most apps don't delete icon files during un-installation.

I delete those icon files.
 
Old 01-10-2017, 01:43 AM   #5
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
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.

'ForWhatItsWorth'. Best wishes always...
 
Old 01-11-2017, 12:25 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
fixit, it's ok to delete those files.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Want to delete the image files from a directory which are not listed in a TEXT file praveen.vp Programming 6 08-03-2015 10:30 AM
Batch merging pairs of files in a directory to unique file names bonissen Linux - Newbie 5 11-29-2011 01:57 PM
how to delete all the files in a directory except one file masood24 Linux - General 6 12-12-2009 01:16 PM
Script to delete files with 0k file size in a directory justgiver Linux - Newbie 4 01-28-2008 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration