Recover Julia Files

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
stumarcus
Posts: 5
Joined: 16 Aug 2024, 05:12

Recover Julia Files

#1 Post by stumarcus »

I removed a folder in my home directory on Ubuntu Linux via: 'rm -r folder_name'. The folder contained a bunch of Julia (.jl) scripts in several subfolders contained in folder_name. Is it possible to recover the .jl files using PhotoRec?
recuperation
Posts: 3026
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Recover Julia Files

#2 Post by recuperation »

No.

Look here:

https://www.cgsecurity.org/wiki/File_Fo ... y_PhotoRec

Have the files been deleted on an SSD?
stumarcus
Posts: 5
Joined: 16 Aug 2024, 05:12

Re: Recover Julia Files

#3 Post by stumarcus »

The files were deleted on an ext4 drive. I will have to check if it is a SSD.
stumarcus
Posts: 5
Joined: 16 Aug 2024, 05:12

Re: Recover Julia Files

#4 Post by stumarcus »

Yes, the files were deleted on a SSD. The folder that was deleted ('/home/stuart/julia_code/Gen7_BPM/archive_6_29_2024') was on the partition /dev/nvme0n1p2, which is an ext4 file system.

$ lsblk -o name,rota
NAME ROTA
loop0 0
loop2 0
loop3 0
loop4 0
loop5 0
sda 0
└─sda1 0
nvme0n1 0
├─nvme0n1p1 0
└─nvme0n1p2 0

$ df -T /home/stuart/julia_code/Gen7_BPM/
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p2 ext4 3844033552 765602156 2883090392 21% /
recuperation
Posts: 3026
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Recover Julia Files

#5 Post by recuperation »

Modern file systems such as your linux notify your SSD about freed space using the TRIM command.
There should be no data remains.
If you are in doubt, you can run PhotoRec. Your Julia files might fall in the text category. You would need to postprocess the results of PhotoRec.

You can test this behaviour - maybe proving that I am wrong.
Copy some Julia scripts on a USB pen drive and delete those Julia files.

Run PhotoRec only searching the unallocated space:

https://www.cgsecurity.org/wiki/PhotoRe ... space_only

When PhotoRec is done, check the found txt-files.
stumarcus
Posts: 5
Joined: 16 Aug 2024, 05:12

Re: Recover Julia Files

#6 Post by stumarcus »

PhotoRec searched the entire partition for *.txt files, but the Julia scripts were not found. A search for 'JuMP' (which appeared in all of the Julia scripts) was not found in any of the text files found by PhotoRec. PhotoRec did not give the option to only search over the unallocated space in the partition.
recuperation
Posts: 3026
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Recover Julia Files

#7 Post by recuperation »

Unfortunately you did not perform my proposed test. Therefore you can't interpret the failure to detect Julia files.

Please post a picture following the screen with the disk selection in PhotoRec. I guess you did something wrong.
stumarcus
Posts: 5
Joined: 16 Aug 2024, 05:12

Re: Recover Julia Files

#8 Post by stumarcus »

Your test did work. A Julia script was copied onto a USB pen drive and then removed from the command line with 'rm'. PhotoRec was able to find the deleted Julia script, searching the unallocated space.
Locked