Results 1 to 7 of 7
  1. #1
    Accidentally ran linux command in OSX - where'd that file go?
    Hi All:

    Not sure if anyone will have the knowledge to help, but I assume there are some developers on here that have experience with both OSes enough to point me in the right direction. I typically use Ubuntu at home, and I have a mac here at work. I as moving some files, and I *might* have used
    Code:
    gio trash *
    in a folder without thinking. Now, with Ubuntu this would move my garbage to the trash and if I needed it, I could go there and recover it. Turns out that's not true on the Mac. I know I should have used
    Code:
    mv * ~/.trash
    Question is, since I did use gio, do we know where those files are? My understanding is that gio is somewhat adaptive, and will accommodate for different systems having trashes in different locations so I'm at a loss...

  2. #2
    Accidentally ran linux command in OSX - where'd that file go?
    MacInWin's Avatar
    Member Since
    Jan 01, 2009
    Location
    Winchester, VA
    Posts
    5,846
    Your Mac's Specs
    MBP 15" Mid 2015, iPhone XS, an iMac, plus ATVs, AWatch, MacMini
    Welcome to the forum.

    Well, I did a "man gio" and got nothing, so gio is not a native command in the default Terminal. I looked at the Ubuntu man page for gio and it would seem that if anything did happen the files would be in the user trashcan. If they don't show there, then about all I can suggest is to try something like EasyFind or Find Any File to search for one of the files you KNOW would be wherever they went to see if it can be found. The rest of them may be in the same location.
    Jake

  3. #3
    You're brilliant mate. Find any File pulled the location - and turns out that gio must have created the folder ~/.local/share/Trash. This is where it would be located on most linux machines (BSD included, which is where Darwin was forked?). Didn't think to look there because A) it's hidden and B) I didn't think about the system creating a directory where one didn't exist. Guess it's like using Touch. Anyway, thanks for the help - it's been a rough Tuesday...

  4. #4
    Accidentally ran linux command in OSX - where'd that file go?
    MacInWin's Avatar
    Member Since
    Jan 01, 2009
    Location
    Winchester, VA
    Posts
    5,846
    Your Mac's Specs
    MBP 15" Mid 2015, iPhone XS, an iMac, plus ATVs, AWatch, MacMini
    Glad it worked. Curious that gio did anything, you must not be using the default bash or you installed gio. And the location for the trash in macOS is ~/.Trash, so that's a different location than where gio moved the files.
    Jake

  5. #5
    Is curious. If I do man gio I get "No manual entry" but it clearly does something. I'm running iTerm2, perhaps that's something?

  6. #6
    If you have Homebrew installed, then you have 'gio' since it comes along with GLIB. Normal Mac without Homebrew wouldn't have it and that command would just have simply failed.
    --
    Regards
    ...Ashwin


  7. #7
    That's it - I do have homebrew. Guess it makes sense for that to have glib.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 07-20-2015, 04:50 AM
  2. Compare OS X command line to Linux command line?
    By V6Pony in forum macOS - Development and Darwin
    Replies: 5
    Last Post: 09-26-2013, 12:32 PM
  3. Any way to recover textedit file I accidentally saved over?
    By oxband in forum macOS - Apps and Games
    Replies: 1
    Last Post: 03-30-2011, 03:53 PM
  4. HELP!! /usr file accidentally deleted!!
    By natobat in forum Switcher Hangout
    Replies: 2
    Last Post: 01-09-2010, 10:07 PM
  5. Mac osx/ linux command line
    By jazzman84116 in forum macOS - Operating System
    Replies: 2
    Last Post: 07-18-2007, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •