2

I had installed notepad++ using Softwares in my Ubuntu 18.04, which installed notepad++ using snap. Now, for some reason, my notepad++ is not opening. But I want to get all the unsaved text files I had opened in my previous session. Where can I find these unsaved files?

Most of the questions on web deal with Windows, but not for ubuntu. They usually say that the files are saved in a folder named backup. I searched in the home directory, snap directory. I couldn't find any folder named backup.

  • 1
    I haven't used Notepad++ on Linux, but it appears to actually be the Windows version running in Wine, so you might need to look inside a Wine prefix. (Normally they would be in ~/.wine, but I'm not sure where they get put for Snaps.) – Harry Cutts May 09 '21 at 22:27
  • 2
    Thanks. Found it in /home/nagabhushan/snap/notepad-plus-plus/common/.wine/drive_c/users/nagabhushan/Application Data/Notepad++/backup/ – Nagabhushan S N May 10 '21 at 04:25
  • Thank you very much, this should be the correct answer – EuberDeveloper Jun 06 '21 at 09:14

2 Answers2

1

My guess would be somewhere below ~/.local or maybe ~/.cache.

I'd try a find for files in the home directory that have changed during the last 3 days (or whenever you used it last):

find ~ -mtime -3

Or maybe start first with ~/.local to avoid dozens of web browser cache files scrolling by:

find ~/.local -mtime -3
HuHa
  • 3,565
  • 3
    Thanks. It was not there in .local. I tried find ~ -mtime -10 | grep notepad and found that the backup folder is situated in /home/nagabhushan/snap/notepad-plus-plus/common/.wine/drive_c/users/nagabhushan/Application Data/Notepad++/backup/ All my files were there. – Nagabhushan S N May 10 '21 at 04:24
-1

On the following Ubuntu:

Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy

Backup files are located in:

/home/$USER/snap/notepad-plus-plus/common/.wine/drive_c/users/$USER/AppData/Roaming/Notepad++/backup/

$USER is used to get the current user name in your system.

In my case,

$ ls /home/$USER/snap/notepad-plus-plus/common/.wine/drive_c/users/$USER/AppData/Roaming/Notepad++/backup/
'new 1@2023-07-24_131201'  'new 1@2023-07-25_225938'  'new 1@2023-07-27_000008'  'new 1@2023-07-30_215759'  'new 1@2023-08-01_145110'
'new 1@2023-07-24_154340'  'new 1@2023-07-26_220545'  'new 1@2023-07-28_122836'  'new 1@2023-08-01_120730'  'new 1@2023-08-01_145923'

On the other hand, you can view and edit your backup path for Notepad++: Open Notepad++ and click Settings > Preferences > Backup

In order to avoid previous session snapshot case, I modified it as: Backup on save > Verbose backup > Custom Backup Directory > C:\users\USERNAME\Desktop\BackupNotepad

Instead of "C:\users\USERNAME\Desktop\BackupNotepad", place directory whatever you would like. Verbose backup basically adds a timestamp when saving the file.

fillo
  • 109
  • 1
    In the question is: "my notepad++ is not opening", So the suggestion to view/edit the backup path in Notepad++ is useless for this question. – Luuk Aug 01 '23 at 14:50
  • 1
    plus acc.to comments TS found it at "home/nagabhushan/snap/notepad-plus-plus/common/.wine/drive_c/users/nagabhushan/Application Data/Notepad++/backup" – Rinzwind Aug 01 '23 at 15:14