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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
My apologies on the title, not sure how to phrase, which is probably why I cannot find with Google.
I prefer to run from the cmd line but have a problem on download of a file that exists already. It gets turned into file.ext(1) or suffixed to number of copies- which is my problem, I do not understand how to handle these suffixed files ???
How do I manipulate from the command line ???
Driving me nuts. Mv seems to complain about directory and I think I read that command line 'rename' is really a utility. Certainly file manager has no trouble changing something like file.ext(2) into file.ext but then cmd line d/n recognize file.ext
Depending on the distro, mv may not overwrite "existing" files with a matching destination name. Rename is mildly more useful when names contain characters not on a qwerty keyboard. But they basically do the same task. You could cp (copy) and cmp (compare) and rm (delete) the old name and location. Depending on how paranoid you are with your data. The mv option trumps cp in many cases because it preserves the original date/time stamp of the file.
The behavior you describe seems to be the default behavior of web browsers. You could just copy the link and wget the file. Using wget -c lets you continue if wasn't fully downloaded (must be an option serverside / not local). Or wget -i to get from a list of links in a file that follows -i. But in general web browsers do the download of already downloaded stuff and add a postfix on the filename. Even though the same file without the postfix already exists and matches it byte for byte.
The trailing \ on the originating filename is probably what gotcha on your previous attempts. It would escape the space between input and output names and make it all one filename, which it can't find. And of course nothing to move it to since the concatenated input omits the output parameter.
If you need a gui option, nautilus (or whatever it goes by these days) lets you do the traditional click wait click to rename a file. Or right mouse -> rename. When all else fails, like unicode / cyrillic characters or filenames with tab characters in them. Which can be annoying to deal with on some [x]terms.