LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2015, 09:48 AM   #1
slackpy
LQ Newbie
 
Registered: Dec 2015
Location: Asuncion - Paraguay - South America
Distribution: Slackware - Ubuntu
Posts: 3

Rep: Reputation: Disabled
Accidentally renamed a lot of directories to "."


Hi,

This is embarrasing.

Well, I was trying to rename directories with spaces in their names.

After running this command: "find -name "* *" -type d | rename 's/ /_/g'" suddenly it apears as that I deleted them all....

But, when I checked the mount points I found this:

----
root@darkstar:~# df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/sdb1 466G 434G 33G 94% /mnt
----

And then this:
----
root@darkstar:/mnt# du -xh --max-depth=1 . | sort -rn
358G .
252G ./Backup
72K ./movies
55G ./movs
45G ./tv
6,1G ./warez
4,0K ./anime
----

It seems that I moved them all to the dot directory....

Its there a way to access the data?

Thanks in advance for your answers.
 
Old 12-24-2015, 02:11 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
the "dot directory" is the current directory.
maybe you were lucky and the script simply didn't work.
next time be more careful and do some testing beforehand.
 
Old 12-24-2015, 05:57 PM   #3
slackpy
LQ Newbie
 
Registered: Dec 2015
Location: Asuncion - Paraguay - South America
Distribution: Slackware - Ubuntu
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
the "dot directory" is the current directory.
maybe you were lucky and the script simply didn't work.
next time be more careful and do some testing beforehand.
Thanks for your reply.

Your right... thats current dir. my mistake

But. if you see the df output there are 75GB missing.

Because its a NTFS partition I'll try to run some checkdisk in a windows machine.

Merry Christmas BTW
 
Old 12-24-2015, 06:20 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by slackpy View Post
if you see the df output there are 75GB missing.
no, i don't see because i don't know how much you had originally.
Quote:
Because its a NTFS partition I'll try to run some checkdisk in a windows machine.
do you know if df works reliably on ntfs?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab renamed dkalsaria Linux - Enterprise 3 01-01-2009 11:48 AM
Uppercase Directories renamed when copying to FAT32 alkos333 Slackware 6 11-18-2008 06:06 PM
prevent directories from being renamed chibi Linux - Newbie 7 04-29-2005 11:24 AM
accidentally renamed my root " / " directory rioguia Linux - Newbie 24 10-28-2004 02:47 PM
modules renamed after copy!! joe83 Slackware 3 08-02-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration