Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Long Should It Take to Move 343GB to the Trash?
#19
Speaking of Terminal, if you need to delete a lot of data quickly, without using the trash, that's the way to go.

https://www.macworld.com/article/2082021...lders.html

It’s dangerously easy to delete files with the rm command. Here's an example. After you launch Terminal (in your /Applications/Utilities folder) type cd ~/Desktop to navigate to the Desktop directory. If you had a file here named MyFile.rtf that you never, ever wanted to see again, you could run this command:
[ Further reading: Learn more about macOS Catalina ]

rm MyFile.rtf

When you press Return, the file will go poof! It will be gone, toast, history. You can’t get it back.

You can even delete multiple files in a single command. So, if you have three files on your Desktop that you want to delete, and you want to delete them all at once, you can do so like this:

rm MyFile.rtf MyCV.rtf MyGreatAmericanNovel.rtf

Again, pressing the Return key does the dirty work.

If I sound ominous when discussing the powers of the rm command, there’s a good reason. As I said before, this command deletes files; it nukes them. You can't get them back. You can’t click on the Trash icon and retrieve files you’ve accidentally deleted.

But there’s a safety net: it’s the -i, or interactive, flag. So, if you're feeling cautious, you could run the above commands with this flag as follows:

-- AND --

Delete everything

The rm command has a powerful option, -R (or -r), otherwise known as the recursive option. When you run the rm -R command on a folder, you’re telling Terminal to delete that folder, any files it contains, any sub-folders it contains, and any files or folders in those sub-folders, all the way down.

For example, lets say you have a directory full of archives, containing sub-directories and files. Deleting each item individually from the Finder or the command line can take a long time. So just run the command like this:

rm -R Archives

Remember, this deletion is final.
Reply


Messages In This Thread
Re: How Long Should It Take to Move 343GB to the Trash? - by decay - 09-18-2019, 03:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)