Delete file in terminal that I dont know the location off?

Discussion in 'Mac Basics and Help' started by metsomaniac, Feb 24, 2016.

  1. metsomaniac macrumors member

    Joined:
    Nov 15, 2011
    #1
    How do I delete a file using terminal that I don't know the location off?

    thanks

    Metso
     
  2. keysofanxiety macrumors 604

    keysofanxiety

    Joined:
    Nov 23, 2011
    #2
    ???

    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?
     
  3. metsomaniac thread starter macrumors member

    Joined:
    Nov 15, 2011
    #3
    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
     
  4. xnatex macrumors member

    Joined:
    Nov 19, 2012
    #4
    You could use the `locate` command to find the file.

    Ex:
    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.
     
  5. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #5

Share This Page