View previous topic :: View next topic |
Author |
Message |
Martux Veteran
Joined: 04 Feb 2005 Posts: 1917
|
Posted: Sat Aug 27, 2016 8:12 am Post subject: Finding empty directories |
|
|
Hello guys!
I had a huge bunch of music copied from my Gentoo box to a smb share. It didn't showed up any errors but unfortunately some folders are just empty at the destination. This is probably due to unsupported characters and/or the length of some paths.
The structure is like this:
/music/interpret/album
What I want to accomplish is to find all the /album folders that are empty.
How can this be done on the shell? Thanks! _________________ "Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction" |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8936
|
Posted: Sat Aug 27, 2016 8:39 am Post subject: |
|
|
I'm sure there is something to be done with `find`, but: can you be sure only full albums are missing, and not also single tracks? I would use rsync to make sure the task is completed, it also supports filename conversion. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Sat Aug 27, 2016 9:57 am Post subject: |
|
|
find . -type d -empty _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
Martux Veteran
Joined: 04 Feb 2005 Posts: 1917
|
Posted: Sat Aug 27, 2016 11:45 am Post subject: |
|
|
That's a good point. I am afraid, the errors have already been deployed throughout my whole backup structure. Will try that find command for sure. _________________ "Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction" |
|
Back to top |
|
|
Martux Veteran
Joined: 04 Feb 2005 Posts: 1917
|
Posted: Sat Aug 27, 2016 11:48 am Post subject: |
|
|
That gave a reasonable result and showed some of the dirs I was already aware of.
This is imho one of the biggest downsides of rsync. If e.g. the filesystem is corrupt, you will not recognize it until it's too late. That's why I was investigating a decent cloud service, but they all seem to suck for one of these reasons: pricing, privacy, no rsync, horrible apps.
Basically I am just looking for something to keep 3 PCs on sync with certain directiries in a LAN. _________________ "Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction" |
|
Back to top |
|
|
|