After that When i run this 'git reset HEAD@{1}' It shows 'Unstaged changes after reset:' followed by all my files including lost files. What should be my next command to recover the lost files?
2599
Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1
103223
I uninstalled Homebrew using .  After running the above commands, I can't find .bashrc and .bash_profle. All files are gone from Documents , Desktop and Downloads :'(  When I do git status on /Users/ava it shows:  # On branch master # Untracked files: #   (use "git add &lt;file&gt;..." to include in what will be committed)  ... all the files which are in /Users/ava   history   113  cd `brew --prefix`   114  rm -rf Cellar   115  brew prune   116  rm `git ls-files`   117  rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions   118  rm -rf .git   119  rm -rf ~/Library/Caches/Homebrew   120  sudo chown -R $USER:admin /usr/local   121  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"   122  brew doctor   What just happened?
107882
I have followed  to  add git-completion.bash to my /opt/local/etc/bash_completion.d/git-completion  and I put PS1='\h:\W$(__git_ps1 "(%s)") \u\$ ' in my .bashrc_profile  But now I am getting this -bash: __git_ps1: command not found everything I do a cd.  Can you please tell me what am I missing?
3153
Is there a command to recover/undelete deleted files by rm?  $ rm -rf /path/to/myfile   How can I recover myfile? If there is such a tool how can I use it?
75470
I accidentally moved all folders from root to a subfolder. (/bin, /etc, /home, /lib, /usr... all moved) The only ones that were not moved, since they were in use, are  /bak, /boot, /dev, /proc, /sys.  Now, any command that I try to execute will simply not happen. I constantly get "No such file or directory".  I am connected through ssh and through ftp, but I cannot move files through ftp, as direct SU login is disabled. I also have access to the actual server if I need to do something directly from there.  I'm assuming I would need to edit a configuration file in order to tell it where to find the /bin folder and that would help me get access again, but I don't know which file that would be or how to do it (since I can't even run chmod to change permissions).  Is there any way out of this other than re-installing?  I am working on an old version of CentOS.  I'm extremely new to the world of Linux, hence this action and the question...
108987
I cut and paste an 80GB worth of files and folders. At about 80% I cancelled it. Are some of the files deleted and gone forever? Does the files that were successfully transferred gets deleted? If yes, can I still recover them?
111918
I'm wondering if there is a way to recover corrupted JPEG files.  They got corrupted because I deleted a folder for error and I promptly recovered it with a recovery software. Most of the photos are just fine but some of them have problems like   grey areas at the bottom color/image shifts of some stripes of the image   I tried by verifying integrity with jpeginfo tool and it actually showed me that these photos had some problems related to the checksum Hauffman bitstream.  Are there any tools around which can try to recover these images? Some of them clearly show that data is still there, just messed up.
75714
I've got 4 specific files that seem to keep disappearing from a user's home directory. As far as we know, there are no cronjobs or other automated tasks that would be removing them.  I've setup auditd on them but the logs aren't really showing anything of interest.  I can see our backup utility accessing them every night until the point they aren't there anymore, but nothing else.  Is there anything that would be causing those files to be removed that would get around auditd?  The files in question are these:  /home/username/.bashrc /home/username/.bash_profile   as well as a couple of files in that user's .ssh directory.  Copies of these files placed into a subfolder called "keepers" get deleted at the same time as well.  Changing the permissions on them to 000 and having them owned by root hasn't helped.   I've currently got inotifywait setup to log create,delete,move on that subfolder, so hopefully that will turn up something, although it doesn't log much aside from when it happened, not what caused it.
43071
Is there a command to delete all the files in a directory that haven't been modified in N days?  I need to clean up some old logs.
122773
Files disappeared from my computer. On running a system search, they were found in C:\found.001\disk0001.chk  I want to go in there and have a look, if there are other files there too, but it gives me an access denied message. I ran chkdsk but it said no problems.   Ideally I would want to run a recovery utility (not the ones for deleted files) that would restore them all to the respective locations. Though I am lucky, I still have them at this weird place.   I am on windows 7.
63651
I'm using ubuntu 9.10 and accidently deleted a specific file within a directory on my system. I checked in the Trash bin and could not locate the file. I deleted it 10mins ago, are there any tools available that I can recovery this file? It's a really important file.  Any help would be highly appreciated  My partition is ext4
61766
I recursively deleted the contents of my root directory with sudo privileges. My display reset, and windowing stopped working. I could no longer run non-buitin commands. Most of my directories (including the home directory disappeared).  What I meant to run:  sudo rm ./* -rf   What I believe I ran:  sudo rm /* -rf   I understand how this command works (see ).  I'm trying to get a better sense of how much (and what parts) of the original files and directory-structure physically remains on the hard-drive.  How much of these "remains" are recoverable? E.g is it possible to use data recovery software like TestDisk/PhotoRec to recover the full home dir itself? What about config files?
62699
I'm working on a bash script that appends to /etc/profile but instead of appending, I accidentally wrote over it, losing all of its content. How can I restore the file?  I did search here but being new to Ubuntu, I don't know if the posted /etc/profile content I see in other questions is the default content.
33852
Several files in my home directory have been disappearing. E.g. .bashrc, .bash_profile, authorized_keys and now .profile.  Regardless of how this happened, I would like to restore the original pristine .profile file. If I create a new user on my system one is created. Where can I find this .profile contents from a fresh, untouched install?
32851
We use git to track changes in /etc/ on our servers.  Administrators work as root when changing files in /etc/, and thus their commits have author  root &lt;root@machinename&gt;   This is not very satisfying since you cannot see which admin actually did the change.  What can we do to get the real admin names in the git log? I don't think that keeping a local clone of the repository is feasible since we often change interatively until something works, and a change-commit-push-seeError-repeat cycle would not help here.
107163
I'm cleaning an output directory before I put things in it.  I want to track the output directory in git with a .gitkeep file, but this keeps on getting deleted with my rm -rf "$OUT_DIR" line in a bash script.  Is there a way to remove the contents of a directory but keep either hidden files or somehow just keep that .gitkeep file?
39006
By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux?