Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-28-2015, 04:58 AM
|
#1
|
Member
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107
Rep: 
|
root | Forensics | Data Recovery
So I deleted something very important accidentally almost 12 hours ago and I finally made progress. After all the files said they were extracted the folder was empty.
This is the video Im using as a tutorial.
https://www.youtube.com/watch?v=raa9...utu.be&t=1m33s
But I am on Ubuntu 13.10
I am not able to complete the first step using foremost
starting from $
He begins as #
first command is
And I am unable to do that.
What is the deal?
I tried switching to sudo -i
and that gives me an error I cannot even cd Desktop at all
Last edited by Cocolate; 03-28-2015 at 05:14 AM.
|
|
|
03-28-2015, 05:17 AM
|
#2
|
Senior Member
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187
|
That video was made using Kali which has root as the default user (!) -- in your system, root probably does not have a "Desktop" folder at all.
Instead, just use your normal user's home directory:
Proceed from there using `sudo` when elevated privileges are required.
|
|
|
03-28-2015, 05:19 AM
|
#3
|
Member
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107
Original Poster
Rep: 
|
I did do exactly that and the folder shows up on the desktop with a lock on it so I cannot see any files inside of it?
|
|
|
03-28-2015, 05:37 AM
|
#4
|
Senior Member
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187
|
Try this:
Code:
sudo chown <user name> <name of folder>
Replace <user name> with your user name & <name of folder> with the the name of the folder.
Last edited by Head_on_a_Stick; 03-28-2015 at 05:37 AM.
Reason: typo
|
|
|
03-28-2015, 09:16 AM
|
#5
|
Member
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107
Original Poster
Rep: 
|
This is what the command looks like
Code:
$ sudo foremost -t all -v -i /dev/sdb1 -o /Desktop/recover/
So Im not sure where you mean to place [chown] and [uid]?
|
|
|
03-28-2015, 09:20 AM
|
#6
|
Senior Member
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187
|
Quote:
Originally Posted by Cocolate
This is what the command looks like
Code:
$ sudo foremost -t all -v -i /dev/sdb1 -o /Desktop/recover/
So Im not sure where you mean to place [chown] and [uid]?
|
I haven't watched the whole video so I have no clue what you're talking about.
The command I gave above will change the ownership of the file in ~/Desktop to your user so that you can access the contents and it should be run independently.
If your user name is "cocolate", use this:
Code:
sudo chown -R cocolate ~/Desktop/recover
(I forgot the `-R` flag originally)
|
|
1 members found this post helpful.
|
03-28-2015, 09:40 AM
|
#7
|
Moderator
Registered: Aug 2002
Posts: 26,914
|
Is not a valid path, use /home/your_username/Desktop/recover or ~/Desktop/recover. You can use the chown command as posted to change ownership from root to your username. This will remove the "lock".
I assume that you inadvertently deleted a file on your Android device and now attempting to recover it. It would of helped us provide better answers if you had posted your actual problem. One suggestion would be to make a copy of your SD card as an image to keep from accidentally overwriting anything.
Is this a phone or tablet?
|
|
|
03-28-2015, 10:47 AM
|
#8
|
Member
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107
Original Poster
Rep: 
|
Quote:
Originally Posted by michaelk
Is not a valid path, use /home/your_username/Desktop/recover or ~/Desktop/recover. You can use the chown command as posted to change ownership from root to your username. This will remove the "lock".
I assume that you inadvertently deleted a file on your Android device and now attempting to recover it. It would of helped us provide better answers if you had posted your actual problem. One suggestion would be to make a copy of your SD card as an image to keep from accidentally overwriting anything.
Is this a phone or tablet?
|
Im on Ubuntu 13.10 Alcatel One Touch Fierce 2 (Thats Android 4.2.x phone)
That was a very helpful suggestion to copy my SD card image. Im recopying the data with the pathname /home/uid/Desktop/recover it is showing the same results so I will now see if I can just chown it once finished and post back with results.
I was thinking wouldnt ddrescue be a more viable option for disk recovery from a USB on Linux if this doesnt go through? Thanks for your response.
|
|
|
03-28-2015, 01:04 PM
|
#9
|
Member
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107
Original Poster
Rep: 
|
Yes all of those things worked.
I would have been done in 5 min had I known:
Switch from MTP to SD card
chown uid
Now ubuntu wont play .mov
18 hours later
|
|
|
03-28-2015, 01:14 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,914
|
With ddrescue you can create an image of the disk. foremost, testdisk or testdisk can be run on the mounted image versus the disk.
Hopefully the deleted file is on the memory card versus the phone's internal memory.
|
|
|
03-28-2015, 02:05 PM
|
#11
|
Member
Registered: Jul 2013
Location: I live in an igloo
Distribution: Hoping to fix my Internets! xD
Posts: 107
Original Poster
Rep: 
|
Quote:
Originally Posted by michaelk
With ddrescue you can create an image of the disk. foremost, testdisk or testdisk can be run on the mounted image versus the disk.
Hopefully the deleted file is on the memory card versus the phone's internal memory.
|
I suspect since where I record videos are saved on the sd card theyd be recovered from there as well do you have any additional input?
If the data is on the internal memory Im completely screwed with Ubuntu I'll just have to create a Windozer disc or possibly see if ddrescue is the solution.
|
|
|
All times are GMT -5. The time now is 05:36 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|