How to recover a file deleted by the "rm" command? [closed]

1

I accidentally deleted a file using the command rm .

Is there any way to recover it?

    
asked by anonymous 11.12.2015 / 15:34

1 answer

0

There are possibilities, but it could make your system inconsistent (if the application is still running), I suggest that you check the server administrator for backup. Also I suggest you use the "trash" system so it will not happen again in the future.

#move trash to trash:

  alias deletar 'mv\!* ~/.lixeira'

# irreversible exclusion:

  alias excluirLixeira 'rm -rf ~/.lixeira/ ;mkdir ~/.lixeira'

#checks if the bin exists:

  if ( ! -d ~/.lixeira ) mkdir ~/.lixeira
    
11.12.2015 / 16:05