Ubuntu :: Using Find And Exec - Convert To Ogg?
Mar 12, 2011I have a bunch of .caf files in a directory that I want to convert to ogg but I cannot figure out way to do it (except manually). I want to do: sox filename.caf filename.ogg
[Code]...
I have a bunch of .caf files in a directory that I want to convert to ogg but I cannot figure out way to do it (except manually). I want to do: sox filename.caf filename.ogg
[Code]...
I've been following the instructions to install Resin, and all seems to go well until I try to run the /bin/httpd.sh file. It simple says:
Code:
exec: 40: -jar: not found
I suspected this was something to do with my JAVA_HOME variable not being set, so I looked up how to do this and added it to my /etc/bash.bashrc file. Saying "echo $JAVA_HOME" does indeed return the correct path so I don't think this is the problem.
i had a problem with the find command in bash (which i deem is close enough to a promming language, if not please move this thread :P). i tried to reduce the command to the problem. i want the backticks, or $() for that matter; to be evaluated by -exec of find, not by bash. is that a caveat of find?
Code:
$ find testd -exec echo `basename {}` ; #confused me
test
test/a
test/b
[code]...
edit: i found out whats causing this. `basename {}` gets evaluated by bash before find is invoked, returns {} and `find . -exec echo {} ;" is run. now my question is, how to escape this eveluation from happening before.
I am trying to automate an svnadmin dump command for a backup script, and I want to do something like this:
find /var/svn/* ( ! -name dir -prune ) -type d -exec svnadmin dump {} > {}.svn ;
This seems to work, in that it looks through each svn repository in /var/svn, and runs svnadmin dump on it.
However, the second {} in the exec command doesn't get substituted for the name of the directory being processed. It basically just results a single file named {}.svn.
I suspect that this is because the shell interprets > to end the find command, and it tries redirecting stdout from that command to the file named {}.svn.
I wrote a script that easily runs it in the same directory as it was run below: #for f in *.MTS do ffmpeg -i "$f" -acodec copy -vcodec libx264 -threads 2 -deinterlace -vpre slow -b 20000k -bt 3000k -refs 4 "${f%.MTS}.mp4" ; #done
I want to be able to use the find command so it will recurse through all the videos in my videos folder. Is there a painless way to do this. Here is the start of my find command but it doesn't work. Any help appreciated:
find . -name "*.MTS" -exec ffmpeg -i 'basename{}' -acodec copy -vcodec libx264 -threads 2 -deinterlace -vpre slow -b 20000k -bt 3000k -refs 4 'basename{%.MTS}.mp4'
I'm very very tired, worked all night long, and I did't sleep for hours... So I'm like a zombie now... half awake, and half asleep.
I was trying to clear a directory. Then I run the command cd to enter the directory, and then before thinking I run this dangerous command. on my Linux server: "find / -mtime +1 -exec rm {} ;"
I got a lot of:
Could this command have deleted something inside these directories? I'm afraid that the next reboot the server won't startup...
i'm trying to resize my album art that is dispersed through various artist/album folders. They are mostly 200x200, but i want to make all of them the same size. The code i'm trying to use is,
Code:
find -iname "cover.jpg" -execdir convert -resize 200x200 {}
or
Code:
find -iname "cover.jpg" -execdir convert {} -resize 200x200
i'm getting the error,
Code:
find: missing argument to `-execdir'
on both whats wrong with my syntax.
I am trying to use 'convert' in command prompt to convert image file format.I get the following error.
convert: UnableToOpenConfigureFile `delegates.xml' @ configure.c/GetConfigureOptions/589.
convert: NoDecodeDelegateForThisImageFormat `airplane.jpg' @ constitute.c/ReadImage/530.
convert: MissingAnImageFilename `airplane.ppm' @ convert.c/ConvertImageCommand/2838.
Find a file and need to do something to it, think there must be a single line solution for:
$ ls *.c
$ cat *.c
An easy way to convert wav files into mp3 (or ogg).
$ sudo-apt-get install nautilus-script-audio-convert mpg321 vorbis-tools lame nautilus-script-manager.
after that run
$ nautilus-script-manager enable ConvertAudioFile
Now, when you right click on audio file, under 'scripts', you will see ConvertAudioFile option.
using 10.04 and i can't get this to work any ideas?relevent bits from collectd.conf
Code:
LoadPlugin exec
<Plugin exec>
[code]....
I did the chown task, as root, and the file icon still has the lock symbol on it. I did it on another file on my desktop just before that, and the symbol went away.I checked 'Properties', and it shows me as owner.It's an ISO on my desktop, copied from LXF Magazine DVD.
View 1 Replies View Relatedtrying to run stuff from CD or DVD ROMS >without< copying to my cluttered hard drive, and came to a thought that I'd like evaluated: Would it work to perhaps use sed during the cd-rom auto-mount or some other point to enable the executable bit for *.exe and other 'executables' to somehow override the read only factor? I'm not too familiar with sed except that i know it can insert/replace new patterns of data for defined patterns of existing data.. so would something like this work? Could it be implemented as permanent function of Ubuntu to 'checkbox' cd/dvd mounts to insert the exec' bit on all, known, or choice files as a sort of 'virtual' permissions that can be placed on RO mounts?
View 2 Replies View RelatedI have Ubuntu 9.04 and just installed Sound Converter. I am trying to convert a bunch of .ogg files to mp3 to play on my iPod and it's not working so well. In the Sound Converter options I have is set to convert to high quality mp3. I choose the folder that the files are in and after a moment (slow laptop) Sound Converter populates, I hit 'convert' and it shows that the conversion completes in two seconds. All that it did was create the new folder structure of artist/album but there is nothing in there. Not sure what I am missing. I used Sound Converter before and it worked fine.
View 2 Replies View RelatedAn unknown error has occurred. Subject 'testing', Account: 'abc@xxxx.net', Server: '202.177.x.x', Protocol: SMTP, Server Response: '451 unable to exec qq (#4.3.0)', Port: 25, Secure(SSL): No, Server Error: 451, Error Number: 0x800CCC6A
View 1 Replies View Relatedizzit possible to use a php exec function to trigger a jar file using -java method?ters/new.png"');However when I run the index.php, it doesn't trigger action.Instead when I run this code in the terminal, it works perfectly well.So is there any configuration needed to perform such action?Oh btw I'm using XAMPP in linux ubuntu and CBSim.jar to convert some images.
View 2 Replies View RelatedI have two breakpoint b1 and b2, and I deinfed scripts s1 and s2 to exec at break time. how to make s1 autorun when b1 was hit?
View 1 Replies View RelatedI'm trying to use convert, I have installed the imagemagick. I use this line:convert *.jpg test.pdf but I'm only able to convert to pdf 1 single jpg file, not multiple files at once. When there's more than one file, I get the following error: Segmentation fault
View 5 Replies View RelatedWhen I try to reload httpd service through commandline interface directly, it works. But when I tried to reload service of named and httpd using php exec(), it doesn't works.service named reloadservice httpd reloadThe service named is OK but httpd got problem.My OS is CentOS 5.4 .
My script:
echo exec("service named reload"); result is " Reloading named: [OK] "
but
[code]....
I am a newbie, I am writing a script file to execute some programs.
# ! bin/ bash
clear
echo "*************************************"
echo " ACOUSTIC MODELLING - BELLHOP "
echo "*************************************"
#exec ssh automatix
code....
problem 1 : I can ssh to the required space but after the terminal prompts me for password it stops ececuting the script.
problem 2: after performing the 'exec' command for the first time. its not executing anything after that line. is there any work around for this.
Im trying to setup SYSCP, only to use to make my life easy, and not commercial.When adding a ftp account, the folder it not created, allso there is no files created in the site-enabeld folder when adding domains.Im guessing is it something whit access from the php, but what should i change?
View 2 Replies View RelatedI have a requirement to find the files having its name as ack_reply. However, there are many other files in the same directory as these resides. Now I have to remove these files from the folder and retain others after 7 days. So I tried to write the below script with grep command.
find $directory -type f -mtime +7 | grep ack_reply
how can I pass this output to -exec command.
If I am not using grep command my script would be as
find $directory -type f -mtime +7 -exec remove.sh {}\;;
How can I use -exec with grep and find.
trouble when I log in the fedora as a normal user(not root) today. When I fill the username and the password press enter key. Then pop up a little window locate at topleft corner. And have one line message : "/usr/bin/xterm : Could not exec /bin/bash : Permission Denied"hen I log in as root, it's ok. And when I open shell and type "su username" then the console print "su: /bin/bash: Permission denied"I have checked the perms of "/bin/bash" , it's 755. And I have tried all things which suggested from articles searched through Google. like change / or /root and other directory's permissions but failed
View 4 Replies View Relatedis it possible to execute command and terminate session all in one phrase
something like this connect to server hostname and than execute command "ls" and than some command
ssh username"at"hostname ls "something"
without "something" this phrase connects to server and lists directory, I need something that after listing directory, terminates session.
My hosting company said: You need to unmount the partition with exec permissions, install memcached and re-mount it with no-exec as a security measure.
Code:
[root@server tmp]# pecl install memcache
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl
channel-update pecl.php.net" to update
[code].....
Within a bash script, I'm attempting to redirect file descriptors with exec, e.g. exec 3>&1 1>&2; however, I'd like to do something like exec $FD>&1 1>&2, which doesn't work because bash tries to execute the value of $FD. Various placements of eval fail, as well. Is there a way around this, or am I stuck hard-coding the descriptor?
View 3 Replies View RelatedJust coming over from Windows here... where I've been using "CreateProcess" which returns a value depending on whether the process was created successfully or not.
Now I'm trying to create a process on linux and I've been learning about fork/exec, and I've been struggling with the fact that there seems to be no easy way to know (within the original parent process) if exec succeeded or not. (without forcing the parent process to hang around polling it or something).
Anyway, I've now just discovered the posix_spawn function, and it seems exactly what I need. However I'm finding the documentation a little hard to understand. In particular, I can't find actual confirmation that it will definitely return an error if creating the process fails (like CreateProcess does on windows). So can anyone confirm that for me?
The text on the documentation states: "If posix_spawn() or posix_spawnp() fail for any of the reasons that would cause fork() or one of the exec family of functions to fail, an error value shall be returned as described by fork() and exec"
This makes me think it uses exec/fork under the hood, and so I wonder if it can be trusted..?
And also, most of the examples on the internet for creating processes use fork/exec, so I wonder if there is some catch with posix_spawn I haven't read about... (since it seems a much simpler way of doing things)
Im using gdb for debugging my application.. I was able to debug child process(when fork comes) .. and in child process we have an exec call to .... So the problem is, when the control come to exec , the exec process is executing at a time... I could not debug the exec. process... error is stack curruption due to same frame So, is there any way to debug the exec process
View 1 Replies View RelatedI have been struggling with this for about a week now. I'm working with QuickUSB to send video streams to and from a device. I get the fastest results by fork()ing and exec()ing new processes everytime I run a pipeline, which works great when reading from files, but now i have to transition it so that i am reading/writing data over a QuickUSB bus. I have it working for each individual process, but i can't run multiple processes because it won't let me open the device. After looking through QuickUSB's API a little closer, i found that the QHANDLE type that they use to describe the usb device is actually just a usb_dev_handle *. From what i have found, this is an incomplete structure, so i am having trouble with opening it in the main process and passing it to each new process to write to it. I already have semaphores set up to prevent multiple processes using it at the same time. I just CANT find out how to utilize the same usb device between two process that are forked and exec. i also must do the exec() because otherwise my gtk and gstreamer fails for trying to share resources.
View 1 Replies View RelatedI am looking for a default, or starting "exclude list" for system backups. We are currently using Symantec Backup Exec, but I also do not think that is important to this question. I would think that the Oracle "lock" files and the /var/run/*.pid files can be excluded from the backup, and probably the dell file also. Can some provide a list of files/directories that can be excluded (from backup) for RHEL 5?
View 1 Replies View Related