LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-21-2017, 12:40 AM   #1
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Rep: Reputation: Disabled
How to download a file that I accidently removed?


I am building a "LAMP." After installing Myslq I accidently erased the "index.html" file from /var/www directory. Is it possible to download just that file? I have tried to re-installing myslq-server but I get the message that it is already installed.

Thank you
Don
 
Old 07-21-2017, 12:57 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
If you use apt-get with the -d option, it should just download the package. Then you could use dpkg to unpack it and find the file you want.

A simpler procedure would be to remove mysqlq and then install it again.
 
1 members found this post helpful.
Old 07-21-2017, 01:24 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
That file is probably from the Apache2 package. You can be sure by checking:

Code:
dpkg -S /var/www/index.html
Then once you know the name of the package it came from, maybe the easy way is to reinstall it.

Code:
apt-get --reinstall install apache2
However, that specific file is not so important. You can make your own and it would be just as valid.
 
1 members found this post helpful.
Old 07-21-2017, 06:29 AM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Here is the default file.

Code:
cat /var/www/index.html
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>
The default permissions of the file.

Code:
ls -l /var/www/index.html
-rw-r--r-- 1 root root 177 Nov 22  2016 /var/www/index.html
 
1 members found this post helpful.
Old 07-21-2017, 11:45 AM   #5
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Original Poster
Rep: Reputation: Disabled
Lightbulb

Quote:
Originally Posted by horwoodabitibi View Post
I am building a "LAMP." After installing Myslq I accidently erased the "index.html" file from /var/www directory. Is it possible to download just that file? I have tried to re-installing myslq-server but I get the message that it is already installed.

Thank you
Don
Thank you for your help. My little problem is resolved!
Don
 
Old 07-21-2017, 11:55 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by horwoodabitibi View Post
Thank you for your help. My little problem is resolved!
Don
Mark it as solved then.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removed accidently removed panel at Suse 11.1? alte_mann SUSE / openSUSE 6 01-29-2009 04:19 AM
Accidently removed the RPM DB rvbalraj Linux - Server 2 05-13-2008 09:41 PM
Accidently removed application bar amivit Slackware 3 10-24-2007 09:30 AM
accidently removed internet icon firedancer Ubuntu 3 08-07-2007 07:38 AM
HELP! accidently removed files RobHill Linux - General 2 06-01-2007 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration