Separate names with a comma.
Discussion in 'Mac Basics and Help' started by metsomaniac, Feb 24, 2016.
How do I delete a file using terminal that I don't know the location off?
How do you delete any file that you don't know the location of? You don't know what you'd be looking to delete?
Do you mean you're trying to locate a specific filename from something you're not sure you deleted, or something else?
basically I have a file a mel script that I wish to delete,
I know the file name but don't know where it is installed on my laptop. I wondered if there is a way I could delete it without knowing where it is.
I've tried to spotlight it but can't locate it
You could use the `locate` command to find the file.
locate -i some_file.txt
It will print out all file paths that match that file name. The -i makes the search be case-insensitive.
You might find it easier to install a file search utility such as iFileX then just search for the file and delete it from within the utility.