Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello guys
I accidentally type mv command wrong.
actually it supposed to be
mv SNAP-20101215* dec10/week3_dec10/
but i type the below instead
mv SNAP-20101215* dec10/week3_dec2010/
Note: there is a folder name "dec10/week3_dec10/"
but there is no folder name "dec10/week3_dec2010/"
as a result of it, instead of having those files under dec10/week3_dec10 but it merge those files into one file name "week3_dec2010" , is there any way to change it back to orginal files?
What distro/shell are you using? On both zsh and bash (under Ubuntu, but I don't think that would affect it) it doesn't let me do that:
Code:
joshua@joshua-desktop:~/test$ rm *
joshua@joshua-desktop:~/test$ echo "Hello 1" > bob1
joshua@joshua-desktop:~/test$ echo "Hello 2" > bob2
joshua@joshua-desktop:~/test$ mv bob* foo
mv: target `foo' is not a directory
Assuming that you HAVE actually made a file (and not moved them into a directory), what is inside the file? Is it the contents of one of the SNAP-20101215 files? Or the contents of all of them one after the other? Or something strange and peculiar?
Distribution: Debian, Ubuntu, CentOS; in days past Fedora, Solaris, SunOS, 4.2BSD, 4.3BSD, SVR4, AIX, HP-UX
Posts: 101
Rep:
Neverland, I don't have an immediate solution, but I believe that the trailing "/" is part of the cause. At least it is why your case is different than Snark's example.
If the source files are actually merged into one destination file, it is likely that your only solution is to manually extract it. If it is human readable, vi or grep or somesuch could help. If it is not human readable, I suspect you have some aggravation in your immediate future.
[joshua@joshua-desktop:~/test]$ mv bob* foo/ (12-22 11:15)
mv: target `foo/' is not a directory
[joshua@joshua-desktop:~/test]$ bash (12-22 11:15)
joshua@joshua-desktop:~/test$ mv bob* foo/
mv: target `foo/' is not a directory
What distro/shell are you using? On both zsh and bash (under Ubuntu, but I don't think that would affect it) it doesn't let me do that:
Code:
joshua@joshua-desktop:~/test$ rm *
joshua@joshua-desktop:~/test$ echo "Hello 1" > bob1
joshua@joshua-desktop:~/test$ echo "Hello 2" > bob2
joshua@joshua-desktop:~/test$ mv bob* foo
mv: target `foo' is not a directory
Assuming that you HAVE actually made a file (and not moved them into a directory), what is inside the file? Is it the contents of one of the SNAP-20101215 files? Or the contents of all of them one after the other? Or something strange and peculiar?
my info.
SNAP-20101215 files are pictures from ip camera.
I use /bin/bash.
GNU bash, version 2.05b.0(1)-release (i586-mandrake-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
Last edited by neverland; 12-27-2010 at 09:34 PM.
Reason: more info.
Assuming that you HAVE actually made a file (and not moved them into a directory), what is inside the file? Is it the contents of one of the SNAP-20101215 files? Or the contents of all of them one after the other? Or something strange and peculiar?
Sorry, I think you misunderstood my question... What is inside the file you made, 'week3_dec2010'?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.