Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Use rsync to delete mass files quickly in Linux

Yesterday I encountered an issue to delete many log files in my Linux workstation, there were around 100,000 files to be deleted. These are log files and they grow very fast, and we need to delete them frequently. Usually we would use rm -rf * to delete these files, but we may need to wait for a relative long time if there are too many files. So we must adopt some unusual way. Fortunately, we can use rsync to delete mass files in one shot.1. Install rsyncyum install rsync2. Create a new empty foldermkdir /tmp/test3. Use rsync to delete target folderrsync --delete-before -a -H -v --progress --s...

14,172 0       DEMO RSYNC DELETE FILE