multiple files moved mistakenly in single file

General discussion about Linux, Linux distribution, using Linux etc.
abdulsami
Cadet
Posts: 1
Joined: Thu Jun 25, 2009 1:27 pm

multiple files moved mistakenly in single file

Postby abdulsami » Wed May 19, 2010 11:40 am

Dear All,

while trying to move multiples files from one location document, multiple files moved into single file due to typing error in directory name. like,

mv file1 file2 file3 mydr

here mistakenly user written mydr instead of mydir and resultantly files moved to mydr file, and we are stuck in how to recover back them this single file.

Any help in this regard would be highly updated.

Regards,
Regards,
A Sami

lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Postby lambda » Wed May 19, 2010 12:53 pm

how did that happen? when i try it, it doesn't work:

Code: Select all

$ echo a > a
$ echo b > b
$ echo c > c
$ mkdir t
$ mv a b c d
mv: target `d' is not a directory
$ ls -l a b c d
ls: cannot access d: No such file or directory
-rw-r--r-- 1 me me 2 2010-05-19 12:51 a
-rw-r--r-- 1 me me 2 2010-05-19 12:51 b
-rw-r--r-- 1 me me 2 2010-05-19 12:51 c
$
on freebsd:

Code: Select all

$ echo a > a
$ echo b > b
$ echo c > c
$ mkdir t
$ mv a b c d
usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory
$
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest