<p>Place to start - use the linux "file" command, which will show the following for a bitcoin wallet (at least in the client I use)</p>

<p>wallet.dat: Berkeley DB (Btree, version 9, native byte-order)</p>

<p>So - you could run something like:</p>

<p>find / -type f exec file '{U}' \; | grep "Berkeley DB"</p>

<p>That would be a start!</p>

CC BY-SA 3.0
2013-11-25T04:29:47.090Z
This worked for me: `find / -type f | xargs file | grep "Berkeley DB (Btree, version 9, native byte-order)"`
Gareth Davidson
CC BY-SA 3.0
2013-11-25T15:00:45.943Z
My wallet file is on Windows 7.  I don't use Linux. :(
MrPatterns
CC BY-SA 3.0
2013-11-25T22:39:28.557Z
Well - you could install "cygwin" and execute the command there (it's more or less a linux environment for windows) - or you could figure out the header and paste it into the "content" part of the Windows search.

Or you could boot from a linux LiveCD / LiveUSB!
Geoff Maciolek
CC BY-SA 3.0
2013-11-24T23:23:35.167Z
2013-11-25T06:20:58.407Z
2013-11-25T06:20:58.407Z
Geoff Maciolek
<p>In Windows 7 download and install Altap Salamander 2.54 (Google for it)</p>

<p>It's file manager (you can use any other file manager as well)</p>

<p>Then press Ctrl and key F to bring search window</p>

<p>Then set all options exactly as in this screen: <a href="http://s21.postimg.org/5qdx5cb1j/search.png" rel="nofollow">http://s21.postimg.org/5qdx5cb1j/search.png</a></p>

<p>In Containing field enter: name"1 (each wallet has this text inside) and then click: Find Now</p>

<p>It takes a while to search entire disc C:</p>

<p>To speed up the process You can setup also Advanced options - see this screen: <a href="http://s21.postimg.org/xzb01t1wn/advanced.png" rel="nofollow">http://s21.postimg.org/xzb01t1wn/advanced.png</a></p>

<p>(I presume that Your wallet size is from 30KB to 10MB. If not change second value)</p>

CC BY-SA 3.0
2013-11-28T03:56:07.577Z
Thanks for your comment.  I noticed your png file shows search results only ending in .dat.  I believe I renamed my wallet file something innocuous like config.sys.  In that scenario, will the Find function still find the wallet file, or does it depend on the extension ending in .dat?  Also, if I find it I WILL tip you, not sure why you edited that comment out. :) You'd deserve it.
MrPatterns
CC BY-SA 3.0
2013-11-25T19:31:44.280Z
2013-11-26T00:40:09.970Z
2013-11-26T00:40:09.970Z
Smart
<p>Write a script (e.g. Perl, Python, Ruby... ) that opens every file on your computer and looks inside it to check the format.  I'm not sure what that format is exactly.  It may be as simple as a certain constant sequence of bytes at the beginning (a so-called "magic number").</p>

CC BY-SA 3.0
2013-11-22T16:37:11.110Z
How do I "check the format".  I can write scripts but I have no idea how to do those 3 words, "check the format".
MrPatterns
CC BY-SA 3.0
2013-11-22T16:47:52.597Z
First you have to find out what the wallet.dat format is... is there a "magic number" at the beginning that identifies it?  Many file formats have such a magic number.  If so, your script must open each file in binary reading mode and read the length of bytes that would be in the magic number and see if it matches the particular bytes for the wallet.dat magic number. You may be able to use PyWallet (https://en.bitcoin.it/wiki/Pywallet) as a helper from your script.  Or at least you could look at the source for Pywallet to see if there are any clues about the existence of a magic number.
RentFree
CC BY-SA 3.0
2013-11-20T17:40:57.153Z
2013-11-20T17:40:57.153Z
RentFree
<p>I bought BTC in 2011 and renamed my wallet.dat to something else that I cannot remember. How can I find my wallet file on my computer? I'm prepared to use the command line and scripting.</p>

CC BY-SA 3.0
2013-11-20T22:21:58.770Z
What operating system are you using?
Nate Eldredge
CC BY-SA 3.0
2013-11-25T15:00:09.267Z
I'm using Windows 7.
MrPatterns
<wallet.dat><windows>
How do I find a renamed wallet whose name I can't remember?
MrPatterns
# How do I find a renamed wallet whose name I can't remember?

(Asked by: username_0 on 2013-11-20)

I bought BTC in 2011 and renamed my wallet.dat to something else that I cannot remember. How can I find my wallet file on my computer? I'm prepared to use the command line and scripting.

**Tags:** wallet.dat, windows

> **Comments:**
> **username_1**: What operating system are you using?  
> **username_0**: I'm using Windows 7.  

---

## 3 answers

### Answer by username_2 on 2013-11-24. Score: 2

Place to start - use the linux "file" command, which will show the following for a bitcoin wallet (at least in the client I use)

wallet.dat: Berkeley DB (Btree, version 9, native byte-order)

So - you could run something like:

find / -type f exec file '{U}' \; | grep "Berkeley DB"

That would be a start!

> **Comments:**
> **username_3**: This worked for me: `find / -type f | xargs file | grep "Berkeley DB (Btree, version 9, native byte-order)"`  
> **username_0**: My wallet file is on Windows 7.  I don't use Linux. :(  
> **username_2**: Well - you could install "cygwin" and execute the command there (it's more or less a linux environment for windows) - or you could figure out the header and paste it into the "content" part of the Windows search.  Or you could boot from a linux LiveCD / LiveUSB!  

---

### Answer by username_4 on 2013-11-25. Score: 2

In Windows 7 download and install Altap Salamander 2.54 (Google for it)

It's file manager (you can use any other file manager as well)

Then press Ctrl and key F to bring search window

Then set all options exactly as in this screen: <http://s21.postimg.org/5qdx5cb1j/search.png>

In Containing field enter: name"1 (each wallet has this text inside) and then click: Find Now

It takes a while to search entire disc C:

To speed up the process You can setup also Advanced options - see this screen: <http://s21.postimg.org/xzb01t1wn/advanced.png>

(I presume that Your wallet size is from 30KB to 10MB. If not change second value)

> **Comments:**
> **username_0**: Thanks for your comment.  I noticed your png file shows search results only ending in .dat.  I believe I renamed my wallet file something innocuous like config.sys.  In that scenario, will the Find function still find the wallet file, or does it depend on the extension ending in .dat?  Also, if I find it I WILL tip you, not sure why you edited that comment out. :) You'd deserve it.  

---

### Answer by username_5 on 2013-11-20. Score: 1

Write a script (e.g. Perl, Python, Ruby... ) that opens every file on your computer and looks inside it to check the format. I'm not sure what that format is exactly. It may be as simple as a certain constant sequence of bytes at the beginning (a so-called "magic number").

> **Comments:**
> **username_0**: How do I "check the format".  I can write scripts but I have no idea how to do those 3 words, "check the format".  
> **username_5**: First you have to find out what the wallet.dat format is... is there a "magic number" at the beginning that identifies it?  Many file formats have such a magic number.  If so, your script must open each file in binary reading mode and read the length of bytes that would be in the magic number and see if it matches the particular bytes for the wallet.dat magic number. You may be able to use PyWallet (https://en.bitcoin.it/wiki/Pywallet) as a helper from your script.  Or at least you could look at the source for Pywallet to see if there are any clues about the existence of a magic number.  

---

