Accidentally removed a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Accidentally removed a script
# 1  
Old 10-13-2010
Accidentally removed a script

I accidentally rm a script (typo) and it doesn't even show up in the trash. Is there any way I can recover?
# 2  
Old 10-13-2010
Does your sys admin do backups? Maybe you can find parts of it in a dump of ther raw device or on your xterm scroll history?
# 3  
Old 10-13-2010
I don't believe so

---------- Post updated at 10:57 AM ---------- Previous update was at 10:57 AM ----------

It's an NFS partition, might the disk blocks still be in tact if I have not written anything to the disk since?
# 4  
Old 10-13-2010
That is why you might find it on the raw device, and the pages would be randomly located. You might pipe the raw device through cat -vt and then tr some unlikely characters to be line feeds and then use more to search for script bits.

I use to use a script editor script that put my changes, if any, away in SCCS before and after editing. I use an xterm with a huge scroll buffer. I back up my source dir ~/mysrc/ automatically every night to a zip. I have a HISTSIZE=32767 ksh command history, and back up .sh_history peridically. I have been here too many times.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to echo "File permissions or ownership changed from required " when accidentally changed.

Hi All, I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :( which have similar names ( /var in root and var of some other directory ).:confused: Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies

2. Shell Programming and Scripting

SFTP - accidentally removing unprocessed records

I have an automated sftp process running on a Linux server that is securely connecting to an insurance company server whereby the insurance company places work assignments into a directory on their windows server (running VanDyke Vshell). My unattended (background) process runs every minute.... (8 Replies)
Discussion started by: jeffvansan
8 Replies

3. Solaris

Script running even after execute permission removed.

Hi All, I'm new to solaris and this site but the advices in this site have helped me a lot. Today i am facing a new issue. We have a script for BMCDashboard and this script is not supposed to run evrytime the server is booted so we disabled the services and removed the execute... (7 Replies)
Discussion started by: Rockyc3400
7 Replies

4. UNIX for Dummies Questions & Answers

accidentally umount -a

Hi all, I accidentally unmounted filesystems using umount -a command. How to recover from this. Please help. Thanks in advance! when i try to use mount -a i got the following output. # mount -a mount: /dev/vg00/lvol05 already mounted or /opt busy mount: /dev/vg00/lvol07 already... (4 Replies)
Discussion started by: lramsb4u
4 Replies

5. AIX

Oracle ASM accidentally messed with my hdisk

I have AIX 5.3 with oracle 10g ( test server). While trying to create RAW disk for Oracle ASM I have accidentally messed with rootvg (hdisk0 & hdisk1) When I do # lspv hdisk0 0516-066 : Physical volume is not a volume group member. Check the physical volume name specified. ... (4 Replies)
Discussion started by: George_Samaan
4 Replies

6. Solaris

Accidentally did a unlink inet

I was trying to remove a symbolic link of /etc/hosts to /etc/inet/hosts well i forgot the command and in the /etc directory i did unlink inet and now i can not get into inet and it does not exist in /etc 1) what do i do to fix the inet directory 2) how do i link /etc/hosts to... (1 Reply)
Discussion started by: deaconf19
1 Replies

7. UNIX for Dummies Questions & Answers

HELP! Accidentally downloaded .gz file non-binary

Let me start by saying I am at a VERY beginner level in terms of UNIX/FTP/etc. Someone loaded a file onto a server for me and zipped it using gzip. I accidentally downloaded the file without using "binary". I now have a "filename.txt.gz" sitting on my computer that I need to unzip. Is... (2 Replies)
Discussion started by: UDcc123
2 Replies

8. Solaris

I may have accidentally redefined one of the outputs...

I get unexpected results when doing ls -al | more and ls -al | grep. When I do not pipe the output, it comes to the screen just fine, and there is output! When I pipe to another command, I either get nothing, or else I get a strange dump. Which of the outputs have I accidentally affected?... (2 Replies)
Discussion started by: joang
2 Replies

9. Solaris

changed shell of the root accidentally

Hi All, I have changed the shell of the root accidentally to /sbin/bash :mad: How do I change that? :( To change that I need to go to ok prompt I think, and there I need to mount the root file system in order to make changes to the respective file. Can any one please suggest how do I do... (4 Replies)
Discussion started by: pintu_asim
4 Replies

10. UNIX for Advanced & Expert Users

Accidentally deleting directory/files

Hi, I accidentally deleted a big directory with all its sub-directories and bunch of source code files which I have been developing for about 2 years... What will I do now, how can I retrieve my files, directory hierarchy back ??? If anyone, please HELP ! ! ! ... (4 Replies)
Discussion started by: milhan
4 Replies
Login or Register to Ask a Question