12-02-2011
If you didn't make a backup, you unfortunately don't have a backup. Overwriting a file is even more dicey than deleting it, deleted files may leave partial contents floating around in unallocated disk sectors, overwriting it may actually trash it so there's literally nothing left.
I can't speak for notepad++ though. It might have made temporary files and, given it crashed, not deleted them. Check for temporary files in /tmp/ as well as any recently-modified files under where WINE keeps temp files for Windows and your user (probably ~/.wine/ )
If you want to look contents floating around in raw disk, stop using that disk immediately, boot a livecd, and scan that partition with magicrescue for ASCII text files. It will find text files on your system, potentially in fragments, and save them as numbered files. You'll likely have a ton of files to pick through and sadly aren't guaranteed to find what you want at all.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
In our webserver customer wants to see the latest 10 files arrived. So the names are hardcoded in webpage like :
filename_01.txt
filename_02.txt
....
....
filename_10.txt
where the filename_01.txt is the latest one (typically the output of ls -1t) in the /../webpage directory.... (2 Replies)
Discussion started by: sabyasm
2 Replies
2. Shell Programming and Scripting
How to overwrite every time a particular portion of a file?
---------- Post updated at 02:16 PM ---------- Previous update was at 02:07 PM ----------
I have a file whose contents are something like:
Output of "apachectl fullstatus" command:
---------------------------------------------... (3 Replies)
Discussion started by: proactiveaditya
3 Replies
3. Programming
Hi ,
i have two basic requirement on linux platform . I am using C language to do this .
1) copying one file to another (assuming i know their file descriptors)
2) Overwriting a file using it file descriptor .
Please guide.
regards
Aki (2 Replies)
Discussion started by: meet123321
2 Replies
4. UNIX Desktop Questions & Answers
I have loads of files in different directories which I do miner changed on them and till now I have to create totally new directories for them, specially as I deal with a whole directory at once :wall::wall::wall::wall:
it creates such as mess really
e.g.
FILES="F1/*"
for X in $FILES
do... (2 Replies)
Discussion started by: A-V
2 Replies
5. Shell Programming and Scripting
I have a script, which runs through cronjob every night 9 PM. It is supposed to do following tasks --
1- Connect to ftp.testsite.com via user redtest
2- Fetch file red_bill.txt to my local server, where my script is residing.
3- Rename red_bill.txt to red_bill.V01.txt everyday on sftp server.... (4 Replies)
Discussion started by: solaris_1977
4 Replies
6. Shell Programming and Scripting
Hi, An application is transferring a file to linux system with same file name. As file is transferring with same name always file will be overwritten. In this case we want to know what times file was overwirtten like below.
Modify: 2014-05-12 00:52:01.000000000
Modify: 2014-05-12... (2 Replies)
Discussion started by: Satyak
2 Replies
7. Shell Programming and Scripting
hi
i have a file as in follwoing:
cat apple.txt
Apple is a fruit
But this fruit is costly
Now I used the sed command and i see output as in following
# sed 's/fruit/healthy &/' fruit.txt
Apple is a healthy fruit
But this healthy fruit is costly
#
sed works fine here. But... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
8. Shell Programming and Scripting
Hello,
I have been working on script in which search and replace the multiple pattern.
1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh
2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies
9. UNIX and Linux Applications
Hi Everyone,
We are trying to do a logrotate for "catalina.out" daily, So have used the "copytruncate" option in the logrotate configuration but ended up seeing there was a 0kb file touched with "catalina.out" and the other file with the current date(compressed) file created and seems the log is... (2 Replies)
Discussion started by: thiyagoo
2 Replies
10. Ubuntu
Hi,
I copied the key of rsa.pub to authorized_keys using the below command
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
By mistake i have executed another command
view cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
so now additional keys are copied.so please help me... (3 Replies)
Discussion started by: SA_Palani
3 Replies
LEARN ABOUT DEBIAN
git-revert
GIT-REVERT(1) Git Manual GIT-REVERT(1)
NAME
git-revert - Revert some existing commits
SYNOPSIS
git revert [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>...
git revert --continue
git revert --quit
git revert --abort
DESCRIPTION
Given one or more existing commits, revert the changes that the related patches introduce, and record some new commits that record them.
This requires your working tree to be clean (no modifications from the HEAD commit).
Note: git revert is used to record some new commits to reverse the effect of some earlier commits (often only a faulty one). If you want to
throw away all uncommitted changes in your working directory, you should see git-reset(1), particularly the --hard option. If you want to
extract specific files as they were in another commit, you should see git-checkout(1), specifically the git checkout <commit> -- <filename>
syntax. Take care with these alternatives as both will discard uncommitted changes in your working directory.
OPTIONS
<commit>...
Commits to revert. For a more complete list of ways to spell commit names, see gitrevisions(7). Sets of commits can also be given but
no traversal is done by default, see git-rev-list(1) and its --no-walk option.
-e, --edit
With this option, git revert will let you edit the commit message prior to committing the revert. This is the default if you run the
command from a terminal.
-m parent-number, --mainline parent-number
Usually you cannot revert a merge because you do not know which side of the merge should be considered the mainline. This option
specifies the parent number (starting from 1) of the mainline and allows revert to reverse the change relative to the specified parent.
Reverting a merge commit declares that you will never want the tree changes brought in by the merge. As a result, later merges will
only bring in tree changes introduced by commits that are not ancestors of the previously reverted merge. This may or may not be what
you want.
See the revert-a-faulty-merge How-To[1] for more details.
--no-edit
With this option, git revert will not start the commit message editor.
-n, --no-commit
Usually the command automatically creates some commits with commit log messages stating which commits were reverted. This flag applies
the changes necessary to revert the named commits to your working tree and the index, but does not make the commits. In addition, when
this option is used, your index does not have to match the HEAD commit. The revert is done against the beginning state of your index.
This is useful when reverting more than one commits' effect to your index in a row.
-s, --signoff
Add Signed-off-by line at the end of the commit message.
--strategy=<strategy>
Use the given merge strategy. Should only be used once. See the MERGE STRATEGIES section in git-merge(1) for details.
-X<option>, --strategy-option=<option>
Pass the merge strategy-specific option through to the merge strategy. See git-merge(1) for details.
SEQUENCER SUBCOMMANDS
--continue
Continue the operation in progress using the information in .git/sequencer. Can be used to continue after resolving conflicts in a
failed cherry-pick or revert.
--quit
Forget about the current operation in progress. Can be used to clear the sequencer state after a failed cherry-pick or revert.
--abort
Cancel the operation and return to the pre-sequence state.
EXAMPLES
git revert HEAD~3
Revert the changes specified by the fourth last commit in HEAD and create a new commit with the reverted changes.
git revert -n master~5..master~2
Revert the changes done by commits from the fifth last commit in master (included) to the third last commit in master (included), but
do not create any commit with the reverted changes. The revert only modifies the working tree and the index.
SEE ALSO
git-cherry-pick(1)
GIT
Part of the git(1) suite
NOTES
1. revert-a-faulty-merge How-To
file:///usr/share/doc/git/html/howto/revert-a-faulty-merge.txt
Git 1.7.10.4 11/24/2012 GIT-REVERT(1)