Ubuntu :: Open Exact Pdf File That Was Created By .tex?
Dec 20, 2010
I wrote a very simple script to compile a Tex document and open the resulting PDF output file. The problem I have is that every now and then there are multiple PDF files in the same directory. For example if I have a file called test.tex I run my script and it compiles the test.tex and creates a file called test.pdf If there are only one tex and pdf file in this folder there is no problem. If there is also a 1.pdf in this folder the test.tex will compile and 1.pdf will open.
My question is: is there a way to open the exact pdf file that was created by the .tex file?
I have a file in some obscure directory that I want to open and edit. I don't want to do something like this...
vim ~/foo/bar/blah/doh/ugh.txt
I'd rather be able to say find this file and open it. I know there are commands like locate and find to find a file or directory, but I'm not sure whether these can (or even should) be utilized in what I'm trying to do. Basically, what is the simplest way to open a file with a program w/o specifying its exact location? (In cases where there isn't another file with the same name in the entire system, and cases where there are multiple).
I'm a little bit confused with partitioning the filesystem in Linux. the difference between creating the file system with fdisk and mkfs (when formatting the disk). I can't clearly tell my problem, so please look at this picture:
in case you have been wondering how some websites hide the exact location of a file on their filesystem, just thought i'd share it with the commnity at large in case someone else is looking for something like this.i take no responsibility for how it is used.
Everything is cool, till I realized, that I still hadn't configured yum to keep downloaded rpm's in the cache :-( And I am ALWAYS keeping the downloaded rpm's !!! I have the filenames from the terminal, but can't figure out how to download them again (easily). I immediately thought of yumdownloader, but it doesn't work as I need it to:
# yumdownloader libxml2-2.7.7-2.fc14.i686.rpm Loaded plugins: presto, refresh-packagekit No Match for argument libxml2-2.7.7-2.fc14.i686.rpm Nothing to download
Maybe I need the contrary to yum whatprovides ? Is there any way to easily do it? (I was quite successful with wget, but I am still missing 11 packages which I can't find them in the repo.
Is their a command I could use to do this? It needs to be 32MB (33,554,432 bytes), can be either random data or just a blank file, though random data would be preferable, and well... that's it.
Though also, is their a way I could copy the file in a terminal and it print out the info such as average speed and/or total time it took to complete. I'm trying to fight some bad reviews on this flash drive I bought that performs very well, and since stupid comment vs stupid comment doesn't win anything I need to apparently be the first to actually test this drive throughly.
I've got a big text file in which I know have probably made some typos (LaTeX). Sometimes I rewrite sentences several times and then end up with double pieces like "the the" or "is is" without noticing it. Most spell checkers that I can use in LaTeX are very basic so they do not notice these grammar errors. Is there a way that I can search for these repetitions by hand using sed or awk or something along these lines? Is there an app for that?
Create a copy of the file above and call it commands.sorted. Use the vi command to manually sort this file. I.e. use yy to copy a line, P or p to paste a line, and dd delete a line. Order the commands with the two lines starting with double quotes first. Then list the rest of the command in alphabetical order.
Anyone have any ideas what he's talking about? Can I copy a file and rename it at the same time while copying it to the same exact directory again? Now sure what the two lines things means either. I have an email out to him but it usually takes a long time for him to answer me. I got alot of work to do so everytime I get hung up it kills me.
I want to copy all files with the name XYZ* into one folder. The problem is that the files are in different subfolders and that not even the depth of the folder structure is the same for all files. Luckily, at least each file has a unique name.
Of course, I thought about the cp command but I guess the depth of the folder structure needs to be the same for this to work.
is there a way i can use mv or another command to move a file to a directory that has not been created yet.Id like to be able to create the directory and move theile in one command. Can this be done? if so how
when I create a new text file in my pendrive, it become executable automatically. The text file name append with asterisk(*). However when I create a text file in Desktop, the created text file is normal and is not executable.
Another thing is when I copy a PDF file to my pendrive, it become executable file with asterisk (*) append after the PDF name. I've try copy whatever to pendrive but all end up with executable file.
I know the who belongs to the IP address that created the file. (is there any way to verify what IP address created what file?) My concern is that it did not come from the address specified. I found this in /tmp/udp.pl.
I have a program what creates files with a certain user and group as owner. How do I make files created by this program belong to a group I specify myself (I know I can chown and chgrp and chmod but I want the files to have a certain group from the beginning). Also I like to be able to specify permissions for these files.
Btw. it's not my own program so cant change the source code of the program to solve my problem.
I can't figure out how to copy a file off a custom RHEL 5 DVD that I created with kickstart after the installation completes and the %post runs. I don't want to run as "%post --no-chroot" because I have a script of system changes that needs to run in chroot. I just want to copy one RPM file into the /tmp so my script can install it. Can I have two %posts, one with chroot and one without? I can't seem to find any RHEL 5.5+ guides for kickstart that can explain to me how to make it work.
I'm just wondering: I know that umask sets the default file permissions for files, however I want to know if there is anyway to set default file permissions for newly created directories.
For example, I want my user to create new directories that anyone can access and modify (777) but I want the new files the user creates to be 755 (read by everyone, written only by user).
create one tar.gz file that contains my /home, /etc, /root directory.
a) The process ended with a 88GB file size (which is ok) but with the following message.Code: tar: Exiting with failure status due to previous errors.I have searched a little but I could not find what went wrong.
b) What are the limitations of tar and gz for backups. Of course I fully understand that they can not be used for differential backups (if it is called like that)
c) Let's say that my backup will be a file of 100GB and I want to see the contents of the .tar.gz. In kde there is a program called ark. Can ark handle so big files? Does it use my hard disk (eg. /tmp) to uncompress the file so to show me its contents? It might be the case that might be the compressed file is much bigger than the left space on the hard disk?
d) How can I do an integrity check when my tar.gz file is created?
Debugging some of my scripts after upgrading from Debian Lenny to Ubuntu 10.04. In so doing, I tripped over this "problem," the solution to which may give me a clue to others.
On a bash shell command line I created a file thusly:
sudo touch zero_file
and it lists as expected with default permissions 0644:
I can place the command (minus the "sudo") in a script & run it under the auspices of sudo & it works. Am I missing something re the stdin redirection when using sudo?
i created a script file named myscript.shi ran this by typing sh myscript.sh and i got my outputbut,when i tried to execute by typing ./myscript.sh i received permission denied errori gave permission as chmod 777 myscript.shthen i executed by typing ./myscript.sh . It worked fineso i wanted to know whether using sh and ./ with permissions are same.. ?or did it work for only this.. are there any differences
I am just starting out in LINUX and I know the basic commands but I am a having a problem. I scoped the man pages but I can't get it. Maybe one of know... Can anyone tell me the cmd to figure out the system a file was created on? I just can't figure out this problem.
I am looking for a way to be mailed a new file when it is created in a certain directory.I have found tools that will notify me when a file is created, such as iWatch with iNotify, but is there a way to actually be sent the new file when it is created.It is only a short text log file, but I would like to read it in my inbox rather than have to login and open the file each time an event is logged.
My program need to monitor the foler to know which file under the folder is being opened/created for writing. I add the folder into watch list using inotify_add_watch, when a file -- say 'AA' -- is created, I'll get the event through read api call. But the inotify_event only have file name 'AA' and a event mask. these parameters can't help me to know how the 'AA' is created/openned. So I have to scan the /proc folder to get to know how is 'AA' created/openned. I don't think this is a efficient way, especially if there are lots of files are openned/created in a short time span.
I'm running Karmic 64-bit and Kate 3.3.90.I have been splitting up a very large (16,000 lines) text file by copy/pasting bits of it into smaller files. I had about 40 of these smaller files loaded into a session along with the large file. About 20 were from a previous day of editing and about 20 had been added (and saved) today.
I tried to save the file I currently had open and Kate crashed. I didn't think it was that big a deal until I reopened Kate and all of the files I had added today were gone!!I've looked in the folder and even the backup files that should have been there for files I'd saved more than once are not there.