Results 1 to 3 of 3
I keep the file systems on my desktop and laptop synchronized with each other using rsync. I am constantly concerned about accidentally overwriting files. I've been using Places -> Search ...
- 06-05-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 2
[SOLVED] excluding directories from find command
I keep the file systems on my desktop and laptop synchronized with each other using rsync. I am constantly concerned about accidentally overwriting files. I've been using Places -> Search for Files... to keep track of new files on the two computers, but I seek a command line solution.
I've been trying to use an appropriate "find" command. I've discovered
(I need the ls command so that I can view the files in reverse chronological order to compare with the other computer.)Code:find ~/000files ~/Music ~/Pictures ~/Videos -mtime 0 | xargs /bin/ls -oht | more
This method works ok, but it has an annoying glitch. If a regular file was modified in the last day, it's host directory also shows up as a new file. That wouldn't be a big deal except that the ls command lists all that directory's contents as well, not just the new files.
My preferred solution would be to tell find to ignore *all* directories. My next favorite solution would be to tell ls to ignore all directories. I tried
which I saw at another site. It didn't work. It also didn't work with the -F flag.Code:ls -p | grep -v "\/"
Is there a way to force "find" to ignore all directories upon output?
- 06-05-2011 #2
add this to find:
Code:-type f
You must always face the curtain with a bow.
- 06-05-2011 #3Just Joined!
- Join Date
- Jun 2011
- Posts
- 2
Wow, that easy! Exactly what I wanted. Obviously I'm not proficient with find. Thank you so much.


