Software :: Automatically Generate Text Files ?
Sep 17, 2010
I have a personal server that is password protected. I convert my movies, and make it so that I can watch them through a browser when I want to. I have quite a few movies. They are sorted into different directories. In each directory there is a WebM folder that contains the video file.
Here is what I want to do:Scan all of the directories and subdirectories in /var/www/ for files with extension of webm.
When a file is found, go to the parent directory and create an html file with the same name as the video, only with an html extension instead of webm.
Automatically enter the following html code into the file with the file name matching the file that was found.
Code:
Is it possible to do this with a script? Is there a GUI program that can do this? I don't mind running the script every time after I convert a movie, but if it could monitor the folders that would be nice.
View 11 Replies
ADVERTISEMENT
Oct 5, 2010
I usually work with plain text files, and when moving them across platforms, the differing format creates problems. I want that whenever I save a file with extension *.txt, it be saved as DOS format, and all other extensions or without get saved as Unix format.
View 2 Replies
View Related
Nov 16, 2009
After a kernel upgrade on my linux, my grub.conf become empty. How can I auto generate grub.conf file? I don't want to do it from scratch.
View 3 Replies
View Related
Aug 12, 2010
I would like to generate a 2d barcode (data matrix) image from some text or text file. Is there a utilyty out there for this?
View 5 Replies
View Related
Jan 22, 2010
I have 2 text files : file1.txt and file2.txt
cat file1.txt
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
cat file2.txt
2 this is sentence1file2
6 this is sentence2file2
54 this is sentence3file2
I would like to join these 2 files. The result should look as follows :
cat joinedfile.txt
2 this is sentence1file2
6 this is sentence2file2
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
54 this is sentence3file2
==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?
View 4 Replies
View Related
May 29, 2011
I have collected the sa* and sar* files for the past two weeks , i need to generate the report for these files how can i do so i am using centos 5.5. assist me with a tool or a command to do the same.
View 6 Replies
View Related
Oct 30, 2010
I was trying to figure out how to generate compressed files in zip format and searched on here. The search produced a list of forum entries on the topic, but all of the instructions were on how to do it in terminal, how to download obscure programs and install them from terminal, then run them from terminal, with all these arcane sets of switches and parameters. Eesh.
It comes with Ubuntu, after all. In the case of zipping files, all you have to do is to go to the File Manager, find the file(s), select it or them, right-click on it or them, and select Compress and file type zip. It's so simple.
There have been a number of other tasks where I wind up spending hours figuring out how to implement the advice offered in these forums through Terminal. The folks who offer the advice often are so good at it that they leave out steps obvious to them, but that take a lot of work for somebody not as skilled at it to find out. After crawling through broken glass to get the job done, and normally screwing something up so it's not quite right once I get it going, I figure out how to do it through the GUI and find out it takes a fraction of the effort.
View 9 Replies
View Related
Feb 2, 2011
if there is an application available to generate a list with files and folders from a location, like a hard drive or a folder? The list could be in any format, even a text file would be just fine.
View 3 Replies
View Related
Dec 7, 2010
I'm posting because I've read everything I can find on google and in the forum and the man page and still can't get it to work. I did read the FAQ, I hope I have adhered to it.I've tried several things and I don't remember exactly everything I tried and in what order.I've got several (12) HP ProLiant DL140 G3 servers running CentOS 5 that lockup about once a week. These are in a remote colo cage so I all i have access to is the built-in HP lights-out management interface, which includes a console, and ssh. I've been trying to get kdump setup to try to figure out what's going on. As an aside, if I run top on the console (via the management interface) the servers stay up for about a week, if I don't run top they crash within about 48 hours.I've used yum update to update to the latest available kernel (2.6.18-194.26.1.el5.x86_64) and installed the debuginfo and debuginfo-common RPMs from http://debuginfo.centos.org/5/x86_64/I have a single command in the /etc/kdump.conf file:ext3 /dev/sda5
View 4 Replies
View Related
Jun 1, 2010
Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.
View 4 Replies
View Related
Sep 8, 2010
I recently upgraded to Ubuntu 10.04. I love the passwords and keys application, but was somewhat surprised at the lack of a context menu in gnome to encrypt a file.
In general, I cannot find how to encrypt files using the keys I generate. Maybe I'm missing something? Probably, I just thought since Ubuntu comes with OOB key generation it would have OOB encryption capabilities.
I've read about seahorse and other ways to ADD encryption, I'm just wondering if ubuntu does it natively. It'd be a good idea to add to brainstorms, right click and encrypt.
View 6 Replies
View Related
Jan 26, 2011
i have a server & there is a website which generate alot of core files, these core files takeup alot of space by time, so i decided to stop it, in WHM the core dump option is disabled, & i used the following command
Code:
ulimit -c 0 but nothing stoped generating core files, i also used the following method http://www.cyberciti.biz/faq/linux-disable-core-dumps/ also this method doesnt stop generating of core dump files, my question is : how i can permenantly stop generating core files for all users or for specific user
View 1 Replies
View Related
Nov 5, 2009
I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.
View 19 Replies
View Related
Jul 4, 2011
I streamed video through a my computer with mediatomb yesterday. The problem is that now, I got these huge log files. I am running out of memory (less than 1 gb left) as we speak. They're filled with ufw entries, but my question is:
I read somewhere about a program called logrotate that were supposed to keep logs from getting to big, is this wrong and should mediatomb generate 3 separate log files with 5gb of data each for just 2 hours of streaming?
View 2 Replies
View Related
Sep 1, 2011
I had some troubles on samba, so I re-installed it.After I uninstalled samba, I noticed old /etc/samba folder/ files were left, so I deleted all of them. Then I installed samba, however, no /etc/samba files were installed.How can I generate default samba configuration files??
View 4 Replies
View Related
Jan 12, 2010
My Ubuntu Karmic install has a very useful Print-to-File Printer configured which allows me to generate Postscript and PDF files.
I have Windows XP running on Virtualbox and I want to be able to generate PDF files using this printer but there appear to be no Printers configured.
View 1 Replies
View Related
Jul 6, 2010
I have a test RHEL5 box, sitting in a brand new Dell blade rack on a PowerEdge M610, with a lovely Emulex OCm10102-F-M FCoE card connected to a Cisco Nexus 5000 switch. The whole setup is extremely new (the cards only recently became available for purchase.) We've finally worked with Emulex to get the cards functional, and we are ready to some stress testing to the SAN. My question now is, is there a good tool I can use to generate a large amount of traffic to a LUN? The Wintel team used a windows-only tool that showed an average of 6gigs/second throughput, so I need something that can generate very large files and simulate a consistent throughput to the LUN. I found iozone, but I'm having a devil of a time with it.
View 2 Replies
View Related
Jan 15, 2010
may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.
View 1 Replies
View Related
Apr 21, 2010
Currently, when I'm searching text in files of my PHP project, I use this line :
Code:
grep -r 'myTextToFind' *
But now, I would like to search only in ".lang" files. How can I do that ?
View 7 Replies
View Related
Feb 23, 2010
I have an existing Nagios installation from before I started working here. It seems to be working well but my boss has just asked for a report of what servers and the associated processes/functions are being monitored. Is there any way to generate this report other than going through all the Nagios configuration files and putting it together manually?
View 3 Replies
View Related
Jan 4, 2010
I am playing around with PyGTK and come across a problem: When I put a TextView inside a ScrolledWindow, and type text into the TextView until it reaches the edge, the cursor goes outside the viewport and I can't see what I'm typing. How to make it so that the ScrolledWindow automatically scrolls so that the caret in the TextView is always in visible?
View 5 Replies
View Related
Mar 4, 2010
I want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.
View 2 Replies
View Related
Apr 16, 2011
I have text files (.txt) to open with gedit but every time I try to open a text file it says:
Code:
Do you want to run "Installed programs", or display its contents?
And if I press Display it will open. How do I make it open automatically?
View 3 Replies
View Related
Jul 11, 2010
I'm having a strange problem with Firefox. I like to tab through text boxes rather than clicking on each one. Problem is, I don't really know if it has anything to do with the tabbing honestly, but I'll type in the box I'll get one letter than it will highlight it all on its own and then obviously get replaced with the next letter I type. I can type one letter, press the forward arrow and type another letter then it automatically highlights the 2 letters, etc etc. I'm really not even sure how to stop it, I try clicking in the box and they doesn't seem to do anything. I'm running Ubuntu 10.04 with firefox 3.6.6.
View 2 Replies
View Related
Mar 16, 2014
Is there any way to use sed to replace certain text in a file with the persons username automatically? Right now i'm using
Code: Select allsed -i.bak s/STRING_TO_REPLACE/STRING_TO_REPLACE_IT/g file.foo
I would like it to automatically inject the persons usrname in the replacement string. Is this possible? I've been looking on line at various sed tutorials and I cant quite find what i'm looking for. I also didn't really see anything in the forums search function.Essentially i'm trying to take this file URL...Android.rules and replace all instances of username with the persons actual username automatically.
Code: Select allsed -i.bak s/username/$USER/g 51_Android.rules
View 0 Replies
View Related
Oct 29, 2010
Ubuntu, and I sure know a little about Shell language. But now I need make my ubuntu boot into text mode directly and login automatically, without entering username/password by manual? I had make ubuntu boot into text mgrub fileRUB_CMDLINE_LINUX_DEFAULT="quiet splash text" , but I don't kown how to make system auto login. I'd like ubuntu login with administrator privilege then run some application automatically.
View 5 Replies
View Related
Oct 11, 2010
I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.
Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'
The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.
View 1 Replies
View Related
Jan 20, 2009
I want to automate this using script.How to automate it?
File1:
s.no# 1 name:aaaaaa
city:abcd
[code]...
View 1 Replies
View Related
Jul 6, 2011
i'm used to using putty on a window's machine.With putty whatever you select is automatically on the clipboard without having to right click and select copy.And right click just pastes.
View 1 Replies
View Related
Apr 15, 2011
Fedora provides several compression techniques. E.g tar, tar.gz, zip etc. I want to know which among them provides
1. the best compression ratio for text files
2. the best compression ratio for binary files
3. fastest compression
View 6 Replies
View Related