Accidentally ran linux command in OSX - where'd that file go?

Joined
Mar 19, 2019
Messages
4
Reaction score
0
Points
1
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...
 
Joined
Jan 1, 2009
Messages
15,494
Reaction score
3,853
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
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.
 
OP
L
Joined
Mar 19, 2019
Messages
4
Reaction score
0
Points
1
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...
 
Joined
Jan 1, 2009
Messages
15,494
Reaction score
3,853
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
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.
 
OP
L
Joined
Mar 19, 2019
Messages
4
Reaction score
0
Points
1
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?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
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.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top