Reverse this command, cd ~/library/caches;rm -rfv *
Hello,
need to reverse this command, lost a lot of files.
cd ~/library/caches;rm -rfv *
Any wise person that can help me ?
Thanks
J.B
Hello,
need to reverse this command, lost a lot of files.
cd ~/library/caches;rm -rfv *
Any wise person that can help me ?
Thanks
J.B
Sorry, but those files are gone - that is what rm does, after all. The cache folder is used by the system and applications to stash stuff for quicker reloading in the future, so if something is missing the application should just reload it if it is still available. If you really need those particular files, your options are to restore from a backup, or use a data recovery application or service.
There is no reverse.
If you have a backup, you can maybe get the files from there, but some backup Utilities do not backup caches, as a cache can always be rebuilt.
Were you not really in the ~/Library/Cache? And you deleted files in your home folder? Or somewhere else valuable?
The ~/Library/Caches folder is used by the operating system and applications that you run for frequently accessed information during your current, and successive login sessions. Removing the entire contents of this Caches folder, rebooting, and emptying the Trash — will not lose user documents, but will slow interactive performance until the Caches contents are recreated.
All of us at one time or another, usually very early in our careers, have been bit at least once by the recursive option of the rm command. It has our respect, as it now does your own.
That's a very dangerous command. I'd recommend never using it again. I suggest using the find command instead.
find ~/library/caches -exec ls {} \;
once you have established that you have the correct files, you change the ls to the remove command.
If you truly cannot replace the files, stop using the machine. Get an external drive. Install macos in the drive. Try some recovery app. It will need to be one that tries to recover deleted files. Should the data be valuable, I'd take the drive out and send it to drivesavers.com.
mac $ find ~/library/caches -exec ls {} \; | wc -l
169372
amazing amount of files.
R
Thanks for your help, I should have known better.
🙂
Thanks for your help, guess I should have known better.
🙂
What kind of files were in the caches that wouldn't be replaced by the various applications?
Reverse this command, cd ~/library/caches;rm -rfv *