What i am trying to do is i want to add numbers from 1 to 100. but that too using multiprocessing. So i made a c programme and using fork() command made two child processes. Now in one child process i am adding from 1 to 50. and in another i am adding 51 to 100. and then in the parent process adding the two results to get the final one. Now the result from the two function i am getting correctly. But after the wait() call the value returned is lost : See the programme below for reference
i am totally new to terminal!!! i extracted both the audio and video from an mkv file. both can be played back without any problem, yet i can't merge them into a single one
I'm totally new to Linux and this website. I was wondering if anyone had or could help me create a shell script that would merge two files from two different directories and then have that new merged file in a third differnt directory.The merged file would need to eliminate duplicates and sort the contents.
Does anyone have a solution for merging files if the number of rows in the two (or more) files is non-equivalent.To exemplify, how about merging the following 3 files:
I am facing a problem while splitting a text file, I need to split a file into some parts and each split file should have 2000 lines, when I do it through "split" command the mother file is kept intact but as per my requirement I need to cut mother file into some parts thus it should not be kept intact.
I have a bunch of text logfiles in the following format:
ID (17 characters) Timestamp (14 characters YYYYmmddHHMMSS e.g. "20060210100040" -> 2006/02/10 10:00:40) Random data (? characters) end of line
The files are already sorted by timestamp.I need to get 1 log file with all the logs from multiple logs files, sorted by timestamp. Note that the log files are really huge, around 3-4G each (and there are dozens of them) I tried the following command:
I would like to know which software can merge different videofiles (mpg, avi) into 1 file. Kino makes a DV-file, which is to big.So I search the equivalent of Microsoft Movie Maker.
I have a latex code file which links itself to many other latex files. The syntax is as follows:input{*path of file to be inputed*}The path is relative to the current working directory, so if my file is stored in /home/kevin/mybook.tex and I want to include a file in /home/kevin/latexstuff/copyleft.tex I simply write:input{latexstuff/copyleft.tex}
The latex compiler includes these files just as if they had been copied and pasted into the main latex file at the point specified. My problem is that I have a document which depends on quite a bit of these input commands,ut I am trying to use a latex preprocessor (ratexdb, adds database fields to your latex documentshich does not support input commands, leaving my file only half processed.So I was wondering: is there any easy way to parse through my main file, detect only the input commands, interpret the syntax and include the files specified (where specified)nd produce a second, populated file, which can then be processed by ratexdb?
During the past eight years I've used a number of computers with different operating systems and browsers. On each one I made a habit of using the bookmark utility of each browser and saving the bookmarks file. I never ensured the continuity of the bookmark file - with each new computer I started a new bookmark file. Even when I was reinstalling the operating system I didn't import the old bookmark file in the newly installed browser: I've always started a new bookmark file. As a result I have tens of bookmark files for Firefox (json format - some kind of xml?) and IE (html file format?) each one containing hundreds or thousands of saved links. I have also some files containing links in text format (created usually when I was using someone else computer).
I would like to be able to manage this bookmarks files by using some sort of "bookmark manager" software. The "bookmark manager" should be able to merge the bookmark files into a single collection/file. It should be able to identify and remove the duplicate entries (I have timely versions of the same bookmark file) and also it should be able to group the entries/links on categories (for example the bookmarked articles on codeproject.com should be grouped under the codeproject category). Not to mention that it should provide a search facility to quickly locate the interesting bookmarks. I couldn't find such software in ubuntu software center. Do you know something that even comes close to what I need?
I used to have 5 drives on my 120GB Hard disk. I had Windows XP and Kubuntu 9.10 installed.today I started merging the drives after I have finished the process I found that grub menu is not loading instead I get something like thisgrub rescue>I am currently using Mepis 7.0 Live CD how can I restore the grub menu so I can boot to Linux or WindowsThe current HardDisk configuration is
Code: # fdisk -l Disk /dev/sda: 120.0 GB, 120034123776 bytes
I need files to be <= 5GB to put on S3. Right now I have an ugly tar / gzip / cut before upload, then cat / zcat / tar on download, but it's really ugly - and nearly every archiver should support archive splitting right? What's the best way?
I have multiple strings (eg. say two, firstLIST=(0 1 2) and secondLIST=(2 3)) and want to create a single string composed of their unique sorted elements. For the sample strings above, I'd like to build masterLIST=(0 1 2 3).I suppose I could write the elements of firstLIST and secondLIST to files
as this gives me a file populated with the elements I'm after, but I'm not sure how to read the elements back into masterLIST... and it doesn't seem "right" to create files to accomplish this. Is there a way to do this by manipulating the strings ${firstLIST[@]} and ${secondLIST[@]} directly? The closest I've come (not close at all) is
Code:
masterLIST=${firstLIST[@]}" "${secondLIST[@]}
but masterLIST built this way has only one element
I am having trouble keeping the name together and the phone number together, I think due to the white space. I have tried "" and '' it doesn't seem to matter. So it may be my syntax? and does it matter how long the first and last names are.
I am very new to LVM, as well as not especially experienced at linux, and have some questions about how lvm works. A few months back I set up a server running FC10 and tried creating Logical Groups during the the initial setup. We've realized that we are not using all the available space on the physical drive, and I realized that for some reason (I'm thinking this might have been the default?), we initially created two Logical Groups (VolGroup00 and VolGroup01) and it appears two Logical volumes in each (LogVol00 and LogVol01). LogVol00 in VolGroup00 is mapped to /, and the other Group was actually unused. I figure that it would be simplest to just use all this space mapped to /, so I thought the thing to do would be to simply merge VolGroup01 to VolGroup00. I tried this:
[root@office mapper]# vgmerge VolGroup00 VolGroup01 Logical volumes in "VolGroup01" must be inactive
So after a bit of research, I tried this:
[root@office mapper]# vgchange -a n VolGroup01 Can't deactivate volume group "VolGroup01" with 1 open logical volume(s)
So apparently There's an open volume, but I don't know how to go about closing it. I removed the LogVol00 from that group, but LogVol01 won't budge.
[root@office mapper]# lvremove VolGroup01 Can't remove open logical volume "LogVol01"
So how do I go about closing this Volume? At one point, there was some output that told me LogVol01 was being used as swap space. How do I handle that?
I have a utility that works with files. The utility is crashing at after about 120 files. The input to the utility is a file containing a filelist. I want to cut the file with the file names in it to seperate files containing about one hundred or so. My thought was to determine the number of lines/100 and then use head and delete to create temporary files to run the utility multiple times to prevent the crash. When I tried to create a variable using the wc -l command the output gives me the number of total lines but it also includes the filename of the input file. (873 Filename.txt) I can not figure out how to remove the Filename.txt from the variable.
I am currently trying to copy a directory of roughly 400GBs to dvd, have gotten myself stuck. I tried to tar and then split; however, I don't have enough room on my hard-drive to make a compressed tar and split it up and then burn to disk, so I need a way to tar the and compress the directory, split it, and burn to disk every 4.3GBs.
I went ahead and installed DAR as an alternative, as I hear it is designed for this type of task, but I can't figure out which way is heads or tails.
I would like to split my display in two, so they would behave like two physical monitors, i.e. it would be for example like to connecting two 960x1080 monitors through physical ports. Is something like this possible? The problem is i would like to run two fullscreen applications on second monitor. Is that even possible? I prefer Windows 7/vista but I welcome Linux solution as well
# lvs -a -o name,copy_percent,devices LV Copy% Devices data 100.00 data_mimage_0(0),data_mimage_1(0) [data_mimage_0] /dev/dm-11(0)
[Code].....
My goal was to remove devices dm-10, dm-11 and dm-14 from my VG, so I decided to extend the VG with dm-16 and mirror my data LV to that device, then split that mirror from the other devices. The FS is mounted and need to stay online...
I want to make a little script/program/something that can organize my TV show collection. I'm italian, so I store for each episode the .mkv file and the .srt file. To let VLC automatic recognize the .srt file, I use the same name for the .mkv and the .srt.
That solution is quite optimal, but we can do better: a program that watches a directory and it's subdirectories and automatically runs mkvmerge if it detects files with the same name in the same folder.
I'm a Java programmer, so I can easily make a program that finds files with the same name and runs mkvmerge.... My problem is the directory listener. I found incron, but the problem is that it don't add the listeners to the subfolders of a folder.
I recently popped in the CD that came with one of my textbooks from school and figured I would be able to rip it pretty easily, but guess what? Too my surprise I find that each chapter of the textbook has it's own PDF file and that each one is encrypted. Is there anyway I can decrypt the PDFs and merge them all into one?
Soon after I installed F12 I realized that I mixed / and /home partitions during the installation, resulting having an enormous / and a relatively small /home. Since I want to avoid resizing the partitions*, is there any way to make Fedora use a certain amount of disk space on / as part of /home. Is this possible? And if it is, are there any drawbacks?
*I actually tried using a live usb but gparted wouldn't let me do any modifications. The volumes were unmounted though...
I was following a tutorial about installing ubuntu on a pendrive and in the process I split the pen drive in two partitions. Now I want to merge both the partitions.
I have a file of size 6GB. I would like to find an utility which will split and join in both windows and in Linux. I know Linux has native split and cat for this purpose. My idea is, if I give this split files to anyone, they should be able to join them either in Windows or Linux. Is there any utility to do this job?