Results 1 to 7 of 7

Thread: Undo terminal command

  1. #1
    Join Date
    Dec 2011

    Undo terminal command

    while im trying to archieve in rar a folder in terminal, i did something wrong like inidicated below. is there any option to undo this command. i lost my university project
    root@gorkem-VirtualBox:/home/gorkem/Desktop# rar -r myfile.rar todo/
    RAR 4.00 beta 3   Copyright (c) 1993-2010 Alexander Roshal   17 Dec 2010
    Shareware version         Type RAR -? for help
    Evaluation copy. Please register.
    Creating archive todo/.rar
    Adding    sirali                                                      OK 
    Adding    hello/helloworld.c                                          OK 
    Adding    hello/helloworld.ko                                         OK 
    Adding    hello/helloworld.o                                          OK 
    Adding    hello/Module.symvers                                        OK 
    Adding    hello/Makefile                                              OK 
    Adding    hello/.helloworld.mod.o.cmd                                 OK 
    Adding    hello/.helloworld.ko.cmd                                    OK 
    Adding    hello/helloworld.mod.o                                      OK 
    Adding    hello/.helloworld.o.cmd                                     OK 
    Adding    hello/helloworld.mod.c                                      OK 
    Adding    hello/modules.order                                         OK 
    Adding    copy of scull/.todo.mod.o.cmd                               OK 
    Adding    copy of scull/todo.mod.c                                    OK 
    Adding    copy of scull/.Makefile.swp                                 OK 
    Adding    copy of scull/todo.mod.o                                    OK 
    Adding    copy of scull/Module.symvers                                OK 
    Adding    copy of scull/todo.o                                        OK 
    Adding    copy of scull/.tmp_versions/todo.mod                        OK 
    Adding    copy of scull/.todo.o.cmd                                   OK 
    Adding    copy of scull/Makefile                                      OK 
    Adding    copy of scull/todo.ko                                       OK 
    Adding    copy of scull/.scull.mod.o.cmd                              OK 
    Adding    copy of scull/.scull.ko.cmd                                 OK 
    Adding    copy of scull/todo.c                                        OK 
    Adding    copy of scull/.scull.o.cmd                                  OK 
    Adding    copy of scull/.todo.ko.cmd                                  OK 
    Adding    copy of scull/modules.order                                 OK 
    Adding    adresdeneme.c                                               OK 
    Adding    scull/.todo.mod.o.cmd                                       OK 
    Adding    scull/todo.mod.c                                            OK 
    Adding    scull/.Makefile.swp                                         OK 
    Adding    scull/todo.mod.o                                            OK 
    Adding    scull/Module.symvers                                        OK 
    Adding    scull/todo.o                                                OK 
    Adding    scull/.tmp_versions/todo.mod                                OK 
    Adding    scull/.todo.o.cmd                                           OK 
    Adding    scull/Makefile                                              OK 
    Adding    scull/todo.ko                                               OK 
    Adding    scull/.scull.mod.o.cmd                                      OK 
    Adding    scull/.scull.ko.cmd                                         OK 
    Adding    scull/todo.c                                                OK 
    Adding    scull/.scull.o.cmd                                          OK 
    Adding    scull/.todo.ko.cmd                                          OK 
    Adding    scull/modules.order                                         OK 
    Adding    todo/todo.mod.c                                             OK 
    Adding    todo/todo.mod.o                                             OK 
    Adding    todo/Module.symvers                                         OK 
    Adding    todo/todo.o                                                 OK 
    Adding    todo/Makefile                                               OK 
    Adding    todo/todo.ko                                                OK 
    Adding    todo/todo.c                                                 OK 
    Adding    todo/modules.order                                          OK 
    Adding    sirali.c                                                    OK 
    Adding                                                  OK 
    Adding    adresdeneme                                                 OK 
    Adding    tarli.tar                                                   OK 
    Adding    hello/.tmp_versions                                         OK 
    Adding    copy of scull/.tmp_versions                                 OK 
    Adding    scull/.tmp_versions                                         OK 
    Adding    hello                                                       OK 
    Adding    copy of scull                                               OK 
    Adding    scull                                                       OK 
    Adding    todo                                                        OK 
    Deleting tarli.tar                         deleted
    Deleting adresdeneme                       deleted
    Deleting                        deleted
    Deleting sirali.c                          deleted
    Deleting todo/modules.order                deleted
    Deleting todo/todo.c                       deleted
    Deleting todo/todo.ko                      deleted
    Deleting todo/Makefile                     deleted
    Deleting todo/todo.o                       deleted
    Deleting todo/Module.symvers               deleted
    Deleting todo/todo.mod.o                   deleted
    Deleting todo/todo.mod.c                   deleted
    Deleting directory todo                              NOT DELETED
    Cannot delete todo
    Directory not empty
    Deleting scull/modules.order               deleted
    Deleting scull/.todo.ko.cmd                deleted
    Deleting scull/.scull.o.cmd                deleted
    Deleting scull/todo.c                      deleted
    Deleting scull/.scull.ko.cmd               deleted
    Deleting scull/.scull.mod.o.cmd            deleted
    Deleting scull/todo.ko                     deleted
    Deleting scull/Makefile                    deleted
    Deleting scull/.todo.o.cmd                 deleted
    Deleting scull/.tmp_versions/todo.mod      deleted
    Deleting directory scull/.tmp_versions               deleted
    Deleting scull/todo.o                      deleted
    Deleting scull/Module.symvers              deleted
    Deleting scull/todo.mod.o                  deleted
    Deleting scull/.Makefile.swp               deleted
    Deleting scull/todo.mod.c                  deleted
    Deleting scull/.todo.mod.o.cmd             deleted
    Deleting directory scull                             deleted
    Deleting adresdeneme.c                     deleted
    Deleting copy of scull/modules.order       deleted
    Deleting copy of scull/.todo.ko.cmd        deleted
    Deleting copy of scull/.scull.o.cmd        deleted
    Deleting copy of scull/todo.c              deleted
    Deleting copy of scull/.scull.ko.cmd       deleted
    Deleting copy of scull/.scull.mod.o.cmd    deleted
    Deleting copy of scull/todo.ko             deleted
    Deleting copy of scull/Makefile            deleted
    Deleting copy of scull/.todo.o.cmd         deleted
    Deleting copy of scull/.tmp_versions/todo.mod    deleted
    Deleting directory copy of scull/.tmp_versions       deleted
    Deleting copy of scull/todo.o              deleted
    Deleting copy of scull/Module.symvers      deleted
    Deleting copy of scull/todo.mod.o          deleted
    Deleting copy of scull/.Makefile.swp       deleted
    Deleting copy of scull/todo.mod.c          deleted
    Deleting copy of scull/.todo.mod.o.cmd     deleted
    Deleting directory copy of scull                     deleted
    Deleting hello/modules.order               deleted
    Deleting hello/helloworld.mod.c            deleted
    Deleting hello/.helloworld.o.cmd           deleted
    Deleting hello/helloworld.mod.o            deleted
    Deleting hello/.helloworld.ko.cmd          deleted
    Deleting hello/.helloworld.mod.o.cmd       deleted
    Deleting hello/Makefile                    deleted
    Deleting directory hello/.tmp_versions               deleted
    Deleting hello/Module.symvers              deleted
    Deleting hello/helloworld.o                deleted
    Deleting hello/helloworld.ko               deleted
    Deleting hello/helloworld.c                deleted
    Deleting directory hello                             deleted
    Deleting sirali                            deleted

  2. #2
    Join Date
    Feb 2011

    Re: Undo terminal command

    I think it is removing all the files in the current directory after compressing them. Your files should be inside .rar file. If you need them you need to un-rar them to a suitable location to get them back.

  3. #3
    Join Date
    Oct 2010
    Ubuntu 12.04 Precise Pangolin

    Re: Undo terminal command

    I have no experience with rar, but from the readout it looks like you created a rar archive called '.rar' in the directory 'todo'. Files beginning with a period are hidden by default, so if you navigate to the 'todo' directory and make hidden files visible (ctrl+h in nautilus, I think that's a pretty universal amongst file managers), and the '.rar' file should be there, with all your stuff in it.

    I think that's your only hope, short of professional data recovery. In general, if it's deleted through the commandline it's gone forever. I don't know why rar would work this way... I assume it's because you used the '-r' flag, but like I say I've never used the program so that might not be it.

    I wish you luck. And, without wanting to sound like a smartass, this kind of stuff is why you should back all important data on an external harddrive.

  4. #4
    Join Date
    Nov 2011
    At home
    Ubuntu 15.04 Vivid Vervet

    Re: Undo terminal command

    I run the command to a terminal to reproduce the problem and rar was trying to put everything I have in a file. Where did you find this command?

  5. #5
    Join Date
    Dec 2011

    Re: Undo terminal command

    Thanks a lot! The rar file was in the todo folder which was sent to recycle bin. the rar file was hidden. In summary: SOLVED!

  6. #6
    Join Date
    Dec 2011

    Re: Undo terminal command

    Quote Originally Posted by BC59 View Post
    I run the command to a terminal to reproduce the problem and rar was trying to put everything I have in a file. Where did you find this command?
    i wrote it from my head i fabricated.

  7. #7
    Join Date
    Oct 2010
    Ubuntu 12.04 Precise Pangolin

    Re: Undo terminal command

    Glad to hear it, please mark the thread as 'solved' (at the top of the page, click on 'Thread Tools' -> 'Mark Thread as Solved').


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts