How can I delete hidden files I mistakenly copied to an external HDD while backing up my /home partition?

Asked by Alberto

Hello Techies,
I know I can look silly but I use to back up my /home partition just copying the directory to an external HDD.
The OS is installed to the internal HDD, and my /home partition lies on it, too.
Now, I've realised I copied the hidden files too (.file), which is not what I wanted.
I tried and deleting them from the external HDD but it's not possible as they only change their name, probably it is a safe behaviour of Linux.
You can guess my question:
how can I get rid of all these hidden files are now on my external HDD?
Please don't laugh at my lack of software and backing up knowledge!

Thanks a lot

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

In Nautilus you can show hidden files and folders then delete as you expect

Revision history for this message
Alberto (alby-the-baldy) said :
#2

Hello Andrew,
actually my os is provided with Thunar 1.6.10. That's what I used to perform deleting of hidden files from my external HDD. By the way "Show Hidden Files" is on.
Did I get it right? To delete .files I need Nautilus? Can't Thunar delete them?
Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Press CTRL + H and they should show. Press again to hide

Revision history for this message
Alberto (alby-the-baldy) said :
#4

Hello Andrew,
Ctrl+H runs, either to show and to hide dot files. Great!

To go back to the point, let's see if I got it right:

1. Thunar 1.6.10 (my os came with it) does not allow to delete hidden files,
2. There are no ways to delete them via command line interface,
3. To perform the given task I need to install Nautilus.

Do you confirm?
Many thanks

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#5

I have no experience with thunar myself, but it would very much surprise me if you can display hidden files, but cannot delete them.

Of course you can delete hidden files from the command line. If you just want to delete the hidden files, but leave all other ones there, the command

ls -A \.* | xargs rm

should help.

The easiest way probably is removing all files at once with
rm -rf directoryname

Revision history for this message
Alberto (alby-the-baldy) said :
#6

GREAT!
And thank you very much!

Revision history for this message
Alberto (alby-the-baldy) said :
#7

Thanks Manfred Hampl, that solved my question.