Linux - NewbieThis 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
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.
I think one of the last files moved has become ss. Not sure how you could fix that with the other files. You could use a data recovery tool for your filesystem but I'm not sure how successfully it would be.
Since commands were executed asynchronously you can't really tell which file was last moved to become ss, but you could have a bet with the last call. You must have seen messages like "command not found.". The one on the last is probably the last file.
Ah,
Now that you mention it, ss is there, but all the other files remain at their original name. Thanks, shouldn't be too hard to find the missing one...
Not sure what the numbers in square brackets are though. Inodes?
Ah,
Now that you mention it, ss is there, but all the other files remain at their original name. Thanks, shouldn't be too hard to find the missing one...
Odd that they're still there after you ran mv on them. Perhaps mv didn't decide to overwrite the new file? If it did then perhaps it's the first called file that was renamed.
Quote:
Not sure what the numbers in square brackets are though. Inodes?
They're job numbers. See JOB CONTROL in bash's manual.
1. Running as root because I long since got sick of sudo & not a critical system.
2. Not sure what splitting files names by bash is. Gonna read up on that.
3. Gnome.
4. There are no children directories.
5. Cool. Didn't know find could do this. Looks like the find -execdir option is good.
6. Didn't work with that syntax either. Getting file not found messages because $file includes the ./ path. Fixed it with;
Code:
for file in ./*; do mv $file ss$(basename $file); done
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.