Programming :: Invoking Extension Files In Ubuntu?
Nov 18, 2010
I'm doing a project in Unix version Ubuntu 10.04. I'm doing an standalone app using C++(Qcreator) and GMT(generic mapping tool) so i need help in the following: how to invoke any extension files using C++?
My problem is this:I have a number of directories, all containing files of different name lenghts, including letters, numbers and possibly spaces. I want to recursively rename all of these files, so that only the _last_ 5 digits (not counting the extension) remain. In other words: I want to cut off all but the last 5 digits and not touch the extension.
I've tried to read up on tr, rename (perl version), sed, cut etc. and browsed through some threads here, but so far couldn't quite figure out how to do it.
If someone could point me to the right (standard) CLI tools and syntax.
I have a signal handler in my tool, which is registered and used between some particular interval (i am using timer). Now this signal handler should NOT allow any other handler to be registered or invoked after this handler is once registered. Is there any way to accomplish this?
I have a few questions regarding HTML, UNIX and Javascript. I've been tasked with creating a fairly simple webpage that takes a few inputs. Each input must correspond to an argument in a UNIX command running on a server.On a UNIX server we have a script (.ksh) that takes 3 arguments. The result of the script is a data file which is FTP'ed to an external server. Let's forget about the FTP portion for now. I would like to know where I should begin.What I know so far:
1) I will need HTML to create the webpage. Skill level is high 2) I will need Javascript to make my webpage more interactive. Skill level is high. 3) I will need to understand the UNIX environment. Skill level is high.
I want to search a Windows partition for all .doc and .xls files and move them over to Xubuntu to burn them to CD.
Is this easiest to do via terminal? I tried to use catfish and select all files, but I think my Mac keyboard (and USA standard keyboard settings) threw the select all files ability.
i am using ubuntu 8.04 and am trying to install a file with a .bin extension so opened the terminal and typed ($ chmod +x typingmastermac.bin )then the computer gave me this (bash: $: command not found). so i am not aware what to do next though most articles i have read about the topic tell me that that is supposed to be the first step in installing a file with a .bin extension. better way to install the typingmastermac.bin file.
I'm a relative cli noob, and I screw something up. I want to remove some files by extension only, going down several folders, while leaving everything else be.I think this might be the the right command / syntax, can someone confirm:Code:rm -rf *.exe *.ini *.!ut /path/
I basically want to transfer firefox settings from one machine to another (or from one user to another) which includes some extensions. Instead of running the browser and installing the extension manually, I just want to copy and paste the relevant files.
I noticed that the folder name where the 'extensions' folder is present is different for different users. And just copying to that folder does not work. code...
I'm guessing there are other configuration files that I need to modify. Can someone tell me right way to go about this?
I recovered some 60,000 files with PhotoRec and need a script to sort them into individual folders based on extension. I was able to do this once before but cannot find the script again (sad thing is that I probably saved it on another HD that I'm having partition issues with, but that's another story....).I found this script:
Code:
#!/bin/dash mkdir "$1" for file in *.$1; do mv "$file" "$1" done
While it does work, I am not looking forward to going through all 132 folders and typing in each extension. The last time I did it, the folder was automatically created based on the extension(s) found.
how to go about extracting the .inf, .sys. and any .bin files from a driver. I found the windows driver for my laptop on the HP website, but it is a .exe file. How do I find the correct file?I am using the Broadcom BCM4312 chipset, on Ubuntu Maverick 10.10 unity 32bit.
I got around 6,000 songs that I copied from my ipod to my external hard drive through rhythmbox, but for some reason it didn't copy over any extensions (all of my music files are mp3's) so I was wondering what would be a really simple way to add the extension to all the files in the music folder. My folders are setup like /Music/Artist/Album/song.mp3 (well right now there is no .mp3 but ya get the point
I have made the simple mistake of using dolphin to rename several picture files of types jpg and png. I have no problem viewing them and Ubuntu still knows which is which (if i view their properties it will state File Type: JPEG or PNG) but unfortunately Ubuntu Tweak does not allow you to chose them without the extension (I am trying to change my login background using this) So what i need is something that can scan several files, determine the file type, and add an appropriate extension to it. I have found several to do so for music files but none for images. I am using Ubuntu 11.04 at the moment.
Is there an easy way to do a recursive command line search on a path for a particular type of file extension?I want to build a script that will check for the existence of any .xxx files in a recursive path, if they exist, I would like to run the "mail" command to send me a message. I already have mail running on he server.My thoughts were to tryQuote:ls -R |grep .iniorQuote:find . |grep .inibut neither of those return only the .ini files, they also return files that are named such as .ini.bak, .ini.original, .ini.old, ect...
how can I rename all files in a directory up to the first dot (there by leaving the file extension alone) to the same thing? Im trying to rename all my media files and associated files in a directory to (preferably) the name of the directory it self. if I have
Code:
A Clockwork Orange - wzzyfg.cd1.avi wzzyfg.cd2.avi wzzyfg.nfo ACO.fanart.jpg orange.tbn
Id like to automatically mass rename them all to
Code:
A Clockwork Orange A Clockwork Orange.cd1.avi A Clockwork Orange.cd2.avi A Clockwork Orange.nfo A Clockwork Orange.fanart.jpg A Clockwork Orange.tbn
I have rename on my server which I used to remove underscores from file names, but I dont know how I would use it to rename everything up to the first period. Bonus points for renaming stuff to the name of the parent folder!
This should be easy but despite all the hints and tricks I've read, I cannot make this work. I have 130+ files with the names filename.avi.001, filename.avi.002, filename.avi.003 all the way up to filname.avi.132. How do I join them? A simple cat command does not work, neither does avimerge or any other utility I can find. I'm guessing because the file extension is a number and not .avi. Is there and easy way to rename them all and then join them? I can't be the only one with this issue but I've scoured the forums and found nothing.
I want a list of all my mp3 files (or any other kind of file, actually) telling me HOW MANY OF THEM I have in my computer.I tried with both find and locate commands in terminal, but they don't tell me how many files I have.
Suppose there is a directory named mydir containing ... aaa.cpp aaa.h bbb.cpp bbb.h Makefile a b Where a,b are executable files. What I want to is to only copy a and b to another location. Is it possible? (other than by manually issuing copy a,b another_dir).
In Fedora, I used the ls -l command to see the directory listing. But I noticed that while all .c files were being shown in green , there was one .c file which was being shown in black.How can two files having the same extension be executable /normal?
I want to write simple firefox extension / script or anything to change URLs from HTTP to HTTPS for selected websites (e.g. facebook). That thing is actually bypassing some security checks in my network.
Can anyone tell me how to proceed? I can deal with language as far its C++ or Python (something else would just take more time that's all )
I downloaded an ISO of some nes roms and used the archive manager to extract the files. It extracted them but it added a ;1 to the end of the extension. I don't want to go through 3500+ rom files and delete the added ;1 to the nes extension. How can I prevent this in the future?
I am trying to find a command which will copy all the files in the folder with extension ".log" which is created one day before the current date. By going through other threads in this forum I found the half solution to this problem
find /mnt/hd -mtime -1 -exec scp {} /mnt/usb ;
This command copying the all the files created one day before(not only *.log) to the /mnt/usb folder. what is the modification required to above command.
I am trying to configure logrotate on APP/DB servers.As per my backup policy,logs will compress in daily basis and and will be moved to a Central storage device.
My tomcat generate several application logs with date extension as well as .log extension.For eg app.log,app.log.2010-10-23-14,catalina.out,catalina.2010-10-25.log etc.
Currently my tomcat logrotation /etc/logrote.d/ #cat /etc/logroate.d/tomcat/ /usr/local/tomcat/logs/*log {
[code]....
But its rotating logs only with .log extension..ie app.log.2010-10-23-14 (with date extension) is not rotating.If i put "*" instead of "*log",its rotating all files including rotated files. How can i rotate files which is having date extension.Also i dont want to keep rotated logs for more than 3 days.
I want to install Forms & Reports Developer Suite in Linux OS So I have downloaded Oracle Developer Suite 10g for Linux (Including Forms & Reports) as_linux_x86_ids_101202_disk1.cpio as_linux_x86_ids_101202_disk2.cpio
So in the Oracle Documentation Site they have given Guide as Follows: To extract the cpio file, move the cpio file to an empty directory, then do: cat filename.cpio | cpio -icd .... but its not extracting.
I've spent all day trying to sort this out and I'm beginning to think this problem is specific to a Mac because I've managed to build this extension just fine on a debian vpsI'm trying to build the PECL extension amfext.I download the source to a folder and run the following:
I've downloaded configuration files for my VPN, Kovurt, and they don't have a .ovpn file extension. Further, when I tried to enter the information manually (using this guide), I saw that the files only include the <ca> tags, and no <cert>, <key> or <tls-auth> tags.
Here is the content of one of the config files, simply named 'Tokyo' with no extension. (adding .ovpn didn't work either):
Code: Select allclient dev tun proto udp remote 50.31.255.86 443 resolv-retry infinite nobind
[Code] ....
I have an open ticket with Kovurt asking for the other info, but I know already that they don't have much in the way of documentation or support for Linux.