Javatpoint Logo
Javatpoint Logo

Save with different file name

By default, downloaded file will be saved with the last name mentioned in the URL. To save file with a different name option O can be used.

Syntax:

Example with default file name

Now, first we'll show an example of a file which will be saved with its default file name.

We've downloaded the following file with command

"wget https://www.google.com/doodles/gerardus-mercators-503rd-birthday"

Now this file will be saved with its default name mentioned in the URL gerardus-mercators-503rd-birthday.

Linux savefile1

Look at the above snapshot, file is saved with its default name.

Example with different file name

Now we'll download the same file and save it with a different file name image using option O.

Example:

wget -O image https://www.google.com/doodles/gerardus-mercators-503rd-birthday

Linux savefile2

Look at the above snapshot, after downloading, our file is saved with the name image.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA