General :: Counting Valid Paragraphs From A Html File?

Mar 28, 2010

I just wrote an html file, but somewhere on the write I lost count of the paragraphs.

In an html file paragaphs starts with <p> and ends with </p>

What I want to know is how to find the valid paragraph.

I used grep '<p>' file_name | grep -wc '</p>' . I dont know if this works.

View 7 Replies


ADVERTISEMENT

Networking :: Craft A Valid Http/1.1 Request For Getting Http Headers (not The Html File Itself)

Sep 27, 2010

Using netcat, nc(1), craft a valid http/1.1 request for getting http headers (not the html file itself!) for the main index page of www dot aalto dot fi. What request method did you use? Which headers did you need to send to the server? What was the status code for the request? Which headers did the server return? Explain the purpose of each header.

nc -v www dot aalto dot fi 8080
HEAD / HTML/1.1
host: www dot aalto dot fi
And it returns:
200 OK
Content-Length: 858
Content-Type: text/html
Last-Modified: Thu, 02 Sep 2010 12:46:01 GMT
[Code]....

I really don't know what does it mean. Question 2: Using netcat, nc(1), start a bogus web server listening on the loopback interface port 8080. Verify with netstat(, that the server really is listening where it should be. Direct your browser to the bogus server and capture the User-Agent: header "Direct your browser to the bogus server and capture the User-Agent: header" I don't understand this question.

View 2 Replies View Related

Debian :: Remove Duplicate "paragraphs" In Text File?

Aug 14, 2011

I have a text file with many pairs of number, one pair in each line. Each 25 of these pairs are a solution to a math problem I've been working on, and each solution is separated from another by a line with "**********".The problem is that there are duplicate solutions. In order to know exactly how many solutions I found, I have to delete the duplicate ones. How can I do that?Just to make things clear, here are the first three solutions:

1 1
3 2
5 3

[code]....

View 3 Replies View Related

Server :: Comparing Zone File Counting And Same Name

Mar 29, 2011

I want to compare zone file counting and same name, not records etc of master and slave dns server so that i sure both server contains same copy of the files at a time. Any utility to compare such files in linux?

View 5 Replies View Related

Programming :: Perl - Counting Files With File - Find

Dec 20, 2010

So this is my code:

Code:

Modification of code I found here. It works, but I don't really know why.

Q1: Why is each filter hit counted only when the conditional is not true?

Q2: I've tried taking the file type, (.old), and put it into a variable for better usability, but then the script fails.

View 14 Replies View Related

General :: Current Time - File Path No Longer Valid

Aug 21, 2011

I am reading about jiffies in linux kernel. In one of the related example in the book Linux Device Driver, the author use
head -8 /proc/currentime
to print out some time information.

However this file is not present in my linux installation (kernel: 2.6.32-131.6.1.el6.x86_64). Why is it the case? Is it because the file path is no longer valid, or it is a distribution feature thing? It is not present in OSX too. What would be an equivalent in OSX?

View 1 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

General :: Convert A Html File Into A Text File?

Mar 8, 2010

i'm trying to convert a html file into a text file when i simply run "html2text <filename>" the output displayed is the way we want but when i redirect the same using "-o" or ">>" the file is having extra characters in it. i even tried -ascii,but no much use.

View 4 Replies View Related

General :: Change The Index.html File?

Jul 1, 2010

I just installed linux. How can I change the index.html file?

my dir is var/www/index.html

it doesnt allow me to delete it the index.html (permission denied) I can't move a file into it either. (permission denied)

View 7 Replies View Related

General :: Viewing HTML File In Network?

Feb 19, 2010

I have indexnew.html file in /var/www/html. I have to view this file in the browser within the network and without using Apache server. Because, my Apache server gets the request to my application. I used http://localhost/indexnew.html to open the file, but it gets to my application.

View 5 Replies View Related

General :: HTML File Server Setup Using Ubuntu

Dec 9, 2010

I'm building a file server using Ubuntu. I want to setup an HTML based file upload/download system where I can create accounts for a few users and allow each user access certain folders. So that the user would open it like a webpage using a web browser and then uploads and downloads files, not needing special setup for the computer. Is there a ready made solution for that purpose? Will I have to code it?

View 1 Replies View Related

General :: File Still Unwriteable In /var/www/html After The Chmod Command

Jun 17, 2011

I've got some trouble while trying to install some applications on my linux system. It is said that the files in my /var/www/html/xxx directory, where I put them, is not writeable. The command chmod 777 xxx has been tried to make it work, but the error remains when I opened the applications again.

To be specific, I want to install phpFreeChat on my system, so I put those files in the /var/www/html/freechat directory, cd there and typed chmod 777 data/private, chmod 777 data/public on bash. Here's the result of list -al data:

drwxr-xr-x. 4 root root 4096 Jun 17 15:07 .
drwxr-xr-x. 13 root root 4096 Jun 17 15:22 ..
drwxrwxrwx. 2 root root 4096 Jun 17 15:07 private
drwxrwxrwx. 3 root root 4096 Jun 17 15:07 public

These all seemed all right to me, until I typed http://localhost/freechat in my browser. Here's the result:

phpFreeChat cannot be initialized,
please correct these errors:
/var/www/html/freechat/src/../data/private
is not writeable

[code]....

View 3 Replies View Related

General :: Counting The Number Of Cfiles In A Project?

Jun 15, 2010

how do i count the total number of cfiles in the project.My project is on a solaris machine what is the command that I have to run to know the total count of cfiles in the .pj folder.

View 1 Replies View Related

General :: Finding (HTML) File Size To Display In Summary

Dec 7, 2009

Need to find the size of a file (html), and display it in a summary file. (Have tried du, ls, size, but none of these work).

View 6 Replies View Related

General :: Counting The Occurrence Of A Word In A Collection Of Files?

Jun 16, 2010

I am trying to find the word count of a specific word in a collection of documents, in Linux.

I have tried with grep and ack-grep in combination with wc but I can't seem to come up with a valid combination of pipes :)

View 1 Replies View Related

General :: Shell Script Which Will Search And Remove A Javascript From All Htm, Html And Php File?

Feb 21, 2011

I need a shell script which will search and remove a javascript from all htm, html and php file.

Code:
<script type="text/javascript"> if (navigator.cookieEnabled) {var user = getCookie("seostop");if (user !=1){winchristop();setCookie("seostop", "1", 7,

[code]....

View 14 Replies View Related

General :: Remove Index.html File Alone In Every Directory Via Bash Script

Jul 7, 2011

I want to remove the index.html file alone in the every directory via bash script, for example i have 5 directories in the path /var/www/vhost

anish
kumar
linux
question
friend

each directories have index.html file now i want to replace the index.html file alone from the other directory /var/tmp/vhosbak

anish
kumar
linux
question
friend

How we can do this using script?

View 5 Replies View Related

General :: Using Lynx To Create Html Page With The File Structure Of A Local Directory

Oct 10, 2010

I'm working with a dual-boot laptop running Ubuntu 10.0/Windows 7 and a Debian 5 VPS while the OS's shouldn't have much impact on my question.

What I would like to do is create a html page that I can upload to my VPS which lists all of the files/folders on my local 2TB hard drive (Specifically media such as Movies, Music, TV Shows...). The media obviously will not reside on the server, but I would like to at least have a list which will allow me to select, for instance, a bands artist so that it redirects me to the albums in the directory below.

Ultimately, I'm looking for Open Directory Browsing without actually having the media on my server. I have been attempting to create something to this effect using lynx, however, I'm not sure if it can be done with this command or if it's even possible for that matter.

View 1 Replies View Related

Software :: Program To Determine If A File Is A Valid Image (jpg, Png, Gif, Etc.)?

Jun 9, 2009

As the title says, I'm looking for a program that will go through all images in a directory tree and determine if they're valid, if they've been corrupted, and (wishful thinking) if they have the wrong extension. Does anything like that exist?

View 7 Replies View Related

Red Hat / Fedora :: Convert Plain Text File To Html File Without Using Perl?

Jun 9, 2010

I am looking for some source package which will convert plain text file to html file without using perl.

I mainly need to do this on an ARM platform, so if I get sources I can cross compile it.

View 5 Replies View Related

Programming :: Converting A HTML File To A PNG File Through Python Script?

Jan 29, 2010

I have managed to create a HTML file inside python code,convert this to a PNG file through a Python script ?

EDIT: Details added: I have a python script which generates map-legends in the form of an html file. The legend generated have to be pasted on a map which is in a png format. A png format file can be pasted on another png format file easily. But because the legends generated are in a html format I cannot paste it on the map file !!

EDIT: Details added: I did Googling first but it resulted in various soft wares for above purpose which I don't want !!

View 12 Replies View Related

Ubuntu :: Restoring Evolution From Backup - No Valid File Message

Jul 7, 2011

I've been using 11.04 Unity, & quite like it. I fired up Blender 2.49b the other day (not used it for a long time) & its behaviour was very erratic. Due to this I decided to reinstall 10.10 for the time being, until October or maybe even the 12.04 LTS. I backed everything up & reinstalled 10.10. I then tried to restore my Evolution from the Natty backup file, which simply didn't work. The message was something about it not being a valid file. I'm assuming this is a non backwards compatibility issue.

Any way getting Blender to work or restoring Evolution? With regard to Blender (in Natty); I've not tried proprietary drivers for my GPU yet as the open source defaults have always been fine, so that's an option. It means another reinstall (of Natty), but that really isn't such a big deal at this point. With regard to Evolution (in Maverick); I found a ppa but I'm unsure how to proceed once I've added it. Would I do an apt-get update & an apt-get install evolution?

View 8 Replies View Related

Ubuntu :: System Crashes - Lower File Not In Valid ECryptfs Format

Jan 10, 2010

Right, I seem to get very random system crashes. My machine will stay up for long periods of time, or sometimes only a few mins, also it doesn't seem related to just using a particular program. As you can imagine this is leading to a bag of woes. After reading on a forum about logs I went to /var/log and in the system log found the following entry . . .

"Jan 10 18:46:10 jon-desktop kernel: [ 92.718896] Either the lower file is not in a valid eCryptfs format, or the key could not be retrieved. Plaintext passthrough mode is not enabled; returning -EIO"

This is repeated multiple times and having checked after a few crashes seems to be the central problem. Being specific about the crashes, they freeze the entire system. Can't ctl-alt-del and sound loops, have to hard reset. I have a feeling that when I first installed Ubuntu 9.10 I selected to use an encrypted file system but have a feeling that I didn't set it up correctly. Not sure exactly what I didn't do but I seem to remember it was to do with generating a passphrase. So . . .

1) What is this error from my logs?
2) Is it linked to me not setting up the encrypted filesystem correctly?
3) Is there a way to check the settings / sort them out properly?
4) Is there documentation for my dullard state which can aid me in this, or is it quite simple?

View 2 Replies View Related

Hardware :: Possible To Write File-system On Hard Disk Without Any Valid Partition

Nov 15, 2010

I've surprisely recognized that it's possible to write a filesystem on a hard disk without any valid partition. Well, the general advantages of partitions are clearly. But what are possible disadvantages or limitaions if you don't use a partition (e.g. if you want to use the complete space as one volume for data mining or so)?

View 14 Replies View Related

Ubuntu :: Build Index.html Into A Full Html Page

Mar 9, 2010

I used wget -r to get all the web pages that were linked from index.html. The pages listed in index.html are all chapters. After using wget -r, all the chapters are now in the same folder on my local hard drive. Is there a way to build the chapters in their proper order into a "long"/"full" web page, rather than simply having each chapter as a link/next link on a previous page?

View 9 Replies View Related

Software :: Add A Php File In /var/www/html Folder?

Jan 24, 2010

i am newbie to fedora and php,fedora test page is displaying when i give the ip address now i want to add a .php file in /var/www/html folder but it says permission denied when i want to save .php file in this folder

View 2 Replies View Related

Programming :: Client Side To Include HTML Within HTML?

Sep 12, 2009

what is the best way (i.e standard way that is supported on all browsers and probably as well followed by web crawlers).... to include an html file either locally or externally in another ? Of course , i've done the research and i also know that there are server side includes (php , asp ...you name it) at the moment , i'm using this:

Quote:

<script type="text/javascript" src="path to file/include-file.js"> </script>

however, i've been warned that this method may not show up in some browsers as some tend to ignore this tag and that crawlers like your favorite search engine wouldn't bother reading this. so , what is the best and safest way to do the job? and btw , the reason why i've ousted SSI's from the start is because of among other things:

1) the fact that the included file is static html and because the text is included pretty much everywhere

2) hoping to reduce load time as the code (if successfully recognized) would hopefully be treated like any other embedded external file (e.x like an image) , therefore it would be cached without the need to downloaded it over and over again for each new page on the site.

View 1 Replies View Related

General :: Cannot Browse Valid URL

Jul 18, 2011

My centos 5.6 firewall server shares its Internet connection with my windows machine behind it. After the required settings, the windows machine can ping valid ip addresses but it cannot browse valid url (despite the fact that DNS is set for it).

View 14 Replies View Related

Ubuntu :: Can Use An HTML File As A Desktop Wallpaper?

May 7, 2010

I am new to Ubuntu and I was wondering if there is a way where I can use an HTML file that I have created as a desktop wallpaper. If you know a way could you please explain as simple as possible because I am new to it all and still getting use to it.

View 3 Replies View Related

Ubuntu Servers :: Can't Edit The HTML File?

Oct 4, 2010

I installed apache and when i go to my 127.0.1.1 ip i see the welcome page. I found the directory where the html is located (var/www/index.html but i cannot edit the file. what is going on here? why cant i edit the HTML file?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved