Mac os x terminal delete

The operating system is probably correct. The error message could be for these reasons:. As you wish to delete the file, my suggestion has been to boot the machine from a linux image, mount your file system and delete the file. Try lsof filename to see if it's really busy. One of the most common causes of this is that you're trying to remove a directory that you have a shell open in.

As other posters say, if you know better then the OS, reboot the system and that will make it forget. But really, they know what they are talking about This is an old question but I'll add my 2 cents, because there are in fact situations where a file is not really in use but the OS still thinks it is.

  • graver cd audio depuis mp3 mac!
  • How to Delete a Printer Command Line on a Mac |
  • IS&T Contributions.

It is possible for a file on a removable device to be in use during a system crash and the system will continue think the file is still in use, even if lsof returns nothing and the file is not really in use. Temporarily, one can rename the file or folder if needed.

Finder issues? How to delete its preferences

Read on, because I had a unique situation in which none of the previously suggested solutions worked, but I did manage to solve my problem. In my case the "busy" file was a. The lsof command showed nothing. A reboot of the mac did not change anything. Shutting down the only other computer on the network that might conceivably be using the file did not change anything.

Disk Utility couldn't do anything with the drive, because it wasn't just a removable device, it was a remote device, not attached directly to the Mac. I copied the file with a new name, because in my case I wanted to rename it, not delete it. After copying I couldn't delete the original because it was still "busy.

How To Delete The Hidden Download Log On Your Mac OS X Computer

I logged into the network attached drive and attempted to "check" the "foreign disk" but the check failed. But now I was able to delete the original file--in Finder, without using sudo or rm -f or anything like that.

It was no longer "busy. I had a similar problem when the main. The repo was on a file server and I was connected with SMB. My client is a Mac running OSX Rebooting the client didn't help. I couldn't switch branches.

Creating and deleting files using the Mac Terminal

I couldn't git stash. I couldn't just rm the file. I was stuck. Then I realized that I could access the server directly.

Clear the Current Session’s History

There, I was able to rm the file and then checkout a new version. Home Questions Tags Users Unanswered. In Terminal, how to erase typed command quickly? Ask Question. Asked 5 years, 1 month ago. Active 1 year, 4 months ago. Viewed 5k times. Nicolas Raoul Nicolas Raoul 3 3 gold badges 8 8 silver badges 20 20 bronze badges. Mateusz Szlosek Mateusz Szlosek It deletes everything after the cursor. I was at the end of the line.

Delete files

The rmdir command does the same to directories also know as folders. Still, if you want to tap into Terminal's powers, this is a command you can't overlook. Deleting files with the Finder isn't too difficult, plus you can always fish files out of the Trash if you change your mind. So why bother using the command line? Here are some reasons:.

How to delete a file in Mac OS X Terminal

Here's an example. If you had a file here named MyFile. When you press Return, the file will go poof! It will be gone, toast, history. You can even delete multiple files in a single command.

Remove Individual OS X Configuration Profile via Command Line | Discussion | Jamf Nation

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:. As I said before, this command deletes files; it nukes them.

  • References:.
  • Problem: The file is locked.
  • need for speed world mac wrapper.
  • favorite books.

You can't get them back. So, if you're feeling cautious, you could run the above commands with this flag as follows:. In order to proceed, you need to type yes , or simply y. Deleting directories, or folders, is a bit different.