I have executed the cronjob that runs the shell script which is in directory.When the cronjob was executed , I found that the directory where the script resides has got deleted.
Note: The directory was deleted with other use not root user.
The issue is files were not been taken any backup before running cronjob and those are important files .
For the files which need recovery, I followed some links that suggested some steps to find out the files which were lost and recovery process without a need of open source data recovery tools.
In one of the youtube link ,the admin provided some steps to get back the lost files.
As first step, below command needs to be executed :
ps -aux | grep <filename>
Please find the ps command attachment for reference
As an output, I could find the file and process id .
When i go for next step, with the process id and run this: cd /proc/<pid>
I got an error as file not found as shown in proc command attachment:
Can you please suggest the steps to recover the files.
That is irrelevant - dead is dead and deleted is deleted.
That may help as long as the process is running: when a file is deleted the system routine unlink() is used, which deletes the inode (and thus every possibility to access the files data). As long as at least one process still has this file opened, though, the unlink() is postponed, so the process still can access the file even though "from outside" the file already ceases to exist.
This means, if you can somehow get "inside" the process in question and if you can bring the process to write the file (or, at least, its inode information) then you can use this to restore the file, otherwise it is lost.
You might have luck with trying TestDisk as long as you haven't done anything further on that filesystem. My suggestion is to unmount it as soon as possible (preferably: NOW!) because the longer it is in use the bigger the chance that data which are still there (but unaccessible right now) will be overwritten (=definitely and ultimately lost forever).
This means that debugfs should not work for a zfs file system.
I do not use the xfs filesystem on any server, so I cannot help on xfs .
I suggest you find something similar to debugfs that works on the xfs filesystem which will help you locale deleted files (if the the deleted inode entries have not yet been cleared).