Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

mv -f /* ../ :/

tridinebandimtridinebandim Veteran
edited August 2012 in General

what did i do ? cant access any file they are disappeared

Comments

  • mv -f ../* /

    should fix it

    Thanked by 1tridinebandim
  • -bash: /bin/mv: No such file or directory

    :( all two days work gone ?

  • tridinebandimtridinebandim Veteran
    edited August 2012

    i think i move root to its upper directory :/ is it possible?

    cd double tab gives this

    root@(none):/# cd dev/ proc/ sys/ usr/

  • what do you get for ls -l /

    Thanked by 1tridinebandim
  • try ../bin/mv

    Thanked by 1tridinebandim
  • Mon5t3rMon5t3r Member
    edited August 2012

    you were moving all files and directories in root ( / ) to your upper current location ( ../ )

    i remember i did that once.. :D if you can mount an ISO file better try it from rescue mode.

    Thanked by 1tridinebandim
  • AsadAsad Member
    edited August 2012

    What did you do?!

    Tried this for the heck of it.. didn't work.

    [root@loki ~]# mv -f /* ../ mv: '/aquota.group' and '../aquota.group' are the same file mv: '/aquota.user' and '../aquota.user' are the same file mv: '/bin' and '../bin' are the same file mv: '/boot' and '../boot' are the same file mv: '/dev' and '../dev' are the same file mv: '/etc' and '../etc' are the same file mv: '/home' and '../home' are the same file mv: '/lib' and '../lib' are the same file mv: '/media' and '../media' are the same file mv: '/mnt' and '../mnt' are the same file mv: '/opt' and '../opt' are the same file mv: '/proc' and '../proc' are the same file mv: '/root' and '../root' are the same file mv: '/sbin' and '../sbin' are the same file mv: '/selinux' and '../selinux' are the same file mv: '/srv' and '../srv' are the same file mv: '/sys' and '../sys' are the same file mv: '/tmp' and '../tmp' are the same file mv: '/usr' and '../usr' are the same file mv: '/var' and '../var' are the same file [root@loki ~]#

    Thanked by 1tridinebandim
  • @Damian said: what do you get for ls -l /

    root@(none):/# ls -l / -bash: /bin/ls: No such file or directory
    i dont have a bin drectory anymore.. :(

    @dmmcintyre3 said: try ../bin/mv

    root@(none):/# ../bin/mv -f ../* / -bash: ../bin/mv: No such file or directory

    Thanked by 2Asad klikli
  • jarjar Patron Provider, Top Host, Veteran

    Your only solution is rm -rf /*

  • i was tryşng to move the directorys content that i am in, to uper directory.

    i should use a single dot?

    sometimes learning is painfull

  • @tridinebandim said: root@(none):/# ../bin/mv -f ../* /

    You need to be in the directory from which you executed the original mv -f /* ../ :/ for that to work.

    Thanked by 1tridinebandim
  • tridinebandimtridinebandim Veteran
    edited August 2012

    rm remove ?

    i removed all i can already

    this is what i did ...

    root@(none):/usr/share/nginx/www/wp-content/themes/turbotheme/hmtpro5# mv -f /* ../ mv: cannot move/dev' to ../dev': Device or resource busy mv: cannot move/proc' to ../proc': Device or resource busy mv: cannot move/sys' to ../sys': Device or resource busy mv: cannot move/usr' to a subdirectory of itself, ../usr'

  • I guess you are fucked, if this is a KVM server just boot with a rescue image and fix it, if it's openVZ you'll have to ask the provider.

    Thanked by 1tridinebandim
  • tridinebandimtridinebandim Veteran
    edited August 2012

    no kvm

    lesson learnt; dont use root if you dont know what you are doing

    i see that /usr/share/nginx/www already there and nginx seems working

    i ll try to download them,

    thanks guys for your help..

  • TazTaz Member
    edited August 2012

    @AsadHaider said: [root@loki ~]#

    Avenger fan :P

  • root@(none):/usr/bin# reboot -bash: reboot: command not found

    :/

  • @tridinebandim its surprising bash still works.

    You need to completely re-install. Boot a recovery CD and get any personal data off, and re-install.

    Thanked by 1tridinebandim
  • TazTaz Member

    @tridinebandim said: root@(none):/usr/bin# reboot

    -bash: reboot: command not found

    Boot your device into recovery mode. Recover data and reinstall. You are going to have fun today :)

    Thanked by 1tridinebandim
  • reinstalled...

    thanks @Taz_NinjaHawk but i am not that confident about linux for now. maybe in future when i ruin my vps, i may try :)

  • TazTaz Member

    @tridinebandim said: but i am not that confident about linux for now. maybe in future when i ruin my vps, i may try :)

    Still better then windows. You have a option to recover :P With win, once it is gone, ADIOS! Best of luck though buddy :)

    Thanked by 1tridinebandim
  • vedranvedran Veteran
    edited August 2012

    cd /usr/share/nginx/www/wp-content/themes/turbotheme/ mv -f ./* /

    ?

    Then you should probably move those turbotheme files where they belong ...

    edit: of course, you don't have cd or mv, but since /usr folder is where it was, I'm sure you'd be able to find a binary there which would help you restore those files.

    Btw, you can always recover! http://www.lug.wsu.edu/node/414

    Thanked by 1tridinebandim
  • @tridinebandim said: thanks @Taz_NinjaHawk but i am not that confident about linux for now. maybe in future when i ruin my vps, i may try :)

    Next time, never ever do anything as root. its disabled for a reason in most desktop distro's.

    Thanked by 2tridinebandim Taz
  • @MrLabradoodle said: @tridinebandim its surprising bash still works.

    It's in the memory. Once you log out and log in it's gone.

    (Proven by a apt-get purge -y glibc6)

    Thanked by 1tridinebandim
  • krokro Member

    Its a good common lesson . double chk when using forceful taggies!

    Thanked by 1tridinebandim
Sign In or Register to comment.