Ubuntu :: Accidently Hit This Command Inside My /var/www Folder - Recover My Files Back?
Feb 27, 2010i accidently hit this command inside my /var/www folder. im screwed big time.I need to recover my files back. is there any chance ?
View 1 Repliesi accidently hit this command inside my /var/www folder. im screwed big time.I need to recover my files back. is there any chance ?
View 1 RepliesDid a basic mistake . Dnt know how to recover .In root user i gave a commandmv / /home/username/except the home directory all the other folders that is /sbin /lib /optetc was moved to /home/username.Now i am unable to execute any command.I also tried to set the PATH and LD_LIBRARY_PATH to the newly copied localtion but none of the command works. Since "mv" command also not working i am unable to change the location.
View 13 Replies View RelatedI'm having a weird problem with GNOME. Inside a folder I have several files and when i open the folder graphically i can't see some of the files. If i use my terminal i can see those files. It's very strange!! I've rebooted my computer and the problem is still there (inside the same folder)
View 1 Replies View RelatedI want to move a simple .rules file from a downloaded package which I have extracted to my homefolder, to the rules.d folder. So I open both Nautilus windows and drag it over, and I get the great "permission denied" error
View 1 Replies View RelatedI want to copy everything in templates/blue to the folder code/
However: cp -r 'templates/blue' 'code'
Creates a folder called blue inside code. I tried cp -r 'templates/blue/*' 'code', but that didn't do anything.
ok trying to use grip but it keeps giving me this messageCode:No write access to write encoded fileso i have a folder in my home folder called flac and i want to modify the folder so that all files within can be written toi have tried
Code:
chmod -R 777 flac/*
and
[code]....
I have around 150+ folders in one directory. All contains some pdf files. Now i want to give some prefix no. to folder only not the files inside. How can i give the prefix to all my folders?Eg : Suppose i want no. 8562 then i want it like as follows
OLD FOLDER NEW FOLDER
ABC/ 8562-ABC/
AABC/ 8562-AABC/
I upgraded from ubuntu 9.10 to 11.04. During installation (Natty) I chosen the option to encrypt the home folder. After a day the system crashed. It was showing that disk is having health problems. If I boot from live cd then i cant access the home folder. When I tried to mount the home folder, it says "Reading directory: input/output error"
Because I used Karmic without problem I reinstalled the Karmic, then I can mount the home folder, but cant access it as it was encrypted.Now Karmic is installed. I tried to boot from Live CD of Natty and tried to mount /home folder, it says some super-block issues.How to access the files in the home folder?
So I am working on a clients PC, and after I saved their data on an external hard drive I left it plugged in while I reinstalled Windows for them.....I HATE Windows. Stupid OS doesnt know any better than to just go deleting everything. Ubuntu would have known better than to delete multiple hard drives like that.
Anyway, please tell me I can salvage this data for my client? It was probably just reformatted. The data should still be there right?
I wiped out 60% of my VirtualBox .vdi files on one of my partions. The file sizes ranged from 3gb to 9gb files. (I did have some backups but 4 months ago). Needless to say I'll be backing my files up more often (especially my Virtual Image .vdi files). So here are the steps...: [ Look, I know it seems like allot of steps, but its worth it in the end!!]
(By the way, these are all ext3 filesystems, I would imagine you could recover fat32 [windows} type filesystems too, but I just did this under Linux filesystems) 1--> If you've found yourself deleted any files, try to unmount the partition. ( In my case it was an external 2 1/2 hard drive, command used to unmount is sudo umount /dev/sda3)
1b--> If you only have one partition, then I'd suggest shutting down your computer and putting a Live CD in it (preferably the Ubuntu Live CD).
2--> Whether 1 or 1b applies to you, install ext3grep from Synaptic or any package manager. (if you had to reboot via a live CD, make sure you unmount the partition that has the deleted files.(example umount /dev/sda1 or in my case it was umount /dev/sda3). If you're on the LiveCD of Ubuntu, I believe it will let you install the ext3grep package using Synaptic Package manager and it will put it in RAM under the Live Desktop Session.
3--> Now here's the important part before you proceed any further. If the partition that has the deleted files is taking up 30gb (yes 30gb used space), then you have to mount an existing partition GREATER than 30gb ***FREE*** SPACE. I happened to have another partition /media/sda7 already mounted that had 50 gb free.
So at this point, you must go to any directory under your (recovery partition, i'm referring to my 50gb partition /media/sda7). To do this, run the command cd /media/sda7, now you're in your (recovery partition). You can make a new directory if you want, or just use any existing directory on the /media/sda7 partition. (I made a directory something like mkdir ./Yikes ) So I get into the directory by cd /media/sda7/Yikes then run the following command....:
ext3grep --restore-all /dev/sda3
4--> ***Keep in mind, you just ran that command from the /media/sda7/Yikes directory on your recovery partition. ***This will create a folder called "RESTORED_FILES" under/in the Yikes Directory.*** The ext3grep command you just submitted will try to recover every single file on that partition that has the deleted files (i.e. /dev/sda3). There is a way to restore single files and their paths, but I got frustrated and just did a full restore.
5--> Depending on the partition size and number of files, it could take 30 minutes to 2 hours or more before you start to see messages in the terminal screen saying "Restored file... Abc.txt or sam.jpg". Let it finish!!! At first you will see it saying "Group 1, Group 2 and crazy characters going across the screen, that's normal." You know it's begining the actual restore process when you start to see "Restored file...".
6--> At this point you can open a DIFFERENT terminal screen and do cd /media/sda7/Yikes/RESTORED_FILES to see the files being restored under the various directories. This does work because I was able to restore at least 25gb worth of files. Again, file sizes ranged from 3gb to 9gb!!
7--> Final step when the 1st terminal screen is done restoring the files, you can either open them up from the /media/sda7/Yikes/RESTORED_FILES directory to check them out, or you can copy them back to where they were deleted before. BUT I WOULD SAY TO MAKE A BACKUP OF THE RESTORED FILES, or keep the restored files in the /media/sda7 partition.
-->Again, I did a "ext3grep --restore-all /dev/sda3" command from the partition that had plenty of free space (i.e. 50gb) to restore the 30 gb worth of deleted files (and that ext3grep --restore-all /dev/sda3 command was run in the following directory /media/sda7/Yikes ).
-->Remember to unmount the /dev/sda3 partition (i.e. the partition that has the deleted files). DO NOT MOUNT /devs/sda3 when running the ext3grep --restore-all command. The ext3grep documentation states you don't want to write anything to that partition because you run the risk of writing over files or directories that could be recovered.
-->This ext3grep utility saved me Big Time!! 4 to 5 months of work restored because of this utility. You can get it from Synaptic Package Manger searching for ext3grep.
I have just accidently deleted /usr/lib as root, how do I restore it from the trash can from command line? Seeing as how no programs will now run. I can't seem to find /root/.Trash, no such folder seems to exist ,or did I just royally screw myself?
Edit:
First off where is the Trash folder for root in Fedora 11 I have googled and looked everywhere I can't get a straight answer. It is not in /root/.Trash for one.
Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.
View 4 Replies View RelatedI accidently reset the SELINUX context on the /var folder from "var_t" to user data. Now I cant go back and set it to "var_t" and i cant access my website anymore
View 3 Replies View RelatedWhen I installed Ubuntu, it created a folder called 'ubuntu' on my hard drive. Is there a way to recover my data from this folder and use it with a newer version of ubuntu. I can't access Ubuntu on my computer. It boots straight into Windows.
View 6 Replies View RelatedI want to use cpio command for back up my files. but I cant understand what's the meaning of -p in this command. pass through?
View 2 Replies View RelatedWhile experimenting with rsync, I accidently deleted a bunch of files in the /proc directory. I think it was the directories: 1, 2, 3 ... 10.This happened a few days ago and after rebooting a number of times, I do not notice any problems.
View 3 Replies View RelatedI have dual boot ubuntu 10.10 and Windows XP and Accidently, Some files in XP system drive files got deleted and now canot boot into Win XP,These are the files left and nothing happend to folder....
AUTOEXEC.BAT
boot.ini
CONFIG.SYS
[code]....
I have to work in terminal but I don't know the command of copying files from one folder to another. e.g from /share/ParaDiS.v2.3.5.1 to /home/newfolder what should I type?
View 4 Replies View Relatedthe script below prints the pwd of where I want to be. after the fi it puts me back at the original dir. just writing these scripts to understand what's going on.
#! /bin/bash
if
[ -d mydir ]
then
cd mydir/ && pwd
fi
When I position icons on the desktop in specific places, then I choose to move a file or folder into another folder, all the icons arrange back to the left side. This happened in an earlier version of KDE 4.x, disappeared the next version, and reappeared. how to keep this from happening. It makes using the desktop a pain in the you know what.
View 2 Replies View RelatedI want to delete all files within a specific folder without actually deleting the folder, what is a good bash command for this?. I found this one but encountered some errors even though I am executing it within the specific folder:
useratdebian:/home/user/folder# find . -type f -exec rm -rf {} ;
[1] 5052
useratdebian:/home/user/folder# find: missing argument to `-exec'
[1]+ Exit 1 find . -type f -exec rm -rf
The command as it appears is:
find . -type f -exec rm -rf {} ;
how to delete only the files contained within the folder called "folder" for example?
I have Administrator rights. I want to create new folder into /opt directory. So i clicked(Right click). but new folder menu has disabled. I cannot create new folder. Then Alternatively I used terminal. then I type mkdir /opt/lampp/htdocs/dummy now folder name has created. but I cannot paste anything into my dummy folder. So I checked permission which has you are not owner. How to create new folder & copy contents to new folder.
View 1 Replies View Relatedi have been using ubuntu since last 3 months. in the mean time i had to reinstall it 3 times. every time i have to install and setup lot of things. is there any way to make a back up and if anything happens i can just recover?
View 3 Replies View RelatedI created a tarball with multiple files. The rpm generator requires those files to be inside a folder. I don't want to move the files before generating the tar. Is there a way to create this folder while generating the tar or after it?
View 1 Replies View RelatedI am trying to find a directory named 480debugerror nested under child directories. I don't know the exact path, or even if I have the exact spelling of the directory I ant to find.
Is there any linux command to find directories with a given prefix or suffix, for example directories with a name of debug or debugerror, with unknown some prefix or suffix?
I accidentally cut and paste two folders into my flash disk. then i deleted the folders from my flash. How can I recover the folders? They are not in my PC trash.
View 6 Replies View RelatedHow can i compress to .gz my folder public_html:
media/sda7/user1/public_html/
I want all files and folders and subfolders and images and everything inside of public_html. Also to be saved on the same folder so i can find it easy How can i do it?
I had installed Ubuntu 10.10 on a W7 OS, as a dual boot. I have removed Ubuntu, and now have that space as "free space". Between the original partition (c:) and the free space, there is a partition that contains the laptop mfg's factory image. I want to recover that free space back to the original c: partition. I was reading about GParted, but do not want to attempt anything until I have some expert advice.
View 1 Replies View Relatedcomputer running ubuntu 10.10 is failing to boot and I want to access the private data in the home folder in order to recover data onto another disk. How do I go about doing this? As far as I can remember its not encrypted but am still unable to access the data to backup.
View 3 Replies View RelatedI switched from OpenSUSE to Fedora and I moved a folder full of coursework and a backup of that folder (which was pretty outdated) onto a usb. Once I had installed Fedora, I first deleted the outdated backup, intending to make another fresh one but then I realised that somehow the original files hadn't copied from OpenSUSE onto the USB.
The situation I'm in now is that I only have the outdated backup in the trash can so I need that back but I get the following error message when I try and recover it:
Quote:
Error while copying to "desktop". There was an error getting information about the destination.
And then when I select the "Show more details" drop-down:
Quote:
Error stating file '/media/5E7A-32A1/desktop': No such file or directory