Ubuntu :: Process Many Files In Script?

Mar 23, 2011

I have a number of files in a folder:

Code:

media@serwer ~/test $ ls
FileA.txt FileB.txt File 1.txt File 2.txt File 3.txt

These files are encoded in codepage WIN1250 and I want to convert them to UTF8 using this script (executing it 'conv *'):

Code:

#!/bin/bash
for file in $1; do
if [ -f $file ]; then

[code]....

However it only renames the first file when it has no spaces in its name. How should I modify it to accept wildcards and to process files with spaces in filename?

View 6 Replies


ADVERTISEMENT

Ubuntu :: Process .html Files As PHP?

Jan 27, 2011

I am running Ubuntu 10.10 64 bit to do testing for a web site. I have successfully added a .htaccess file to the production site to process .html files as PHP files, but cannot get my localhost to process the files the same way.

Addition to apache2.config:

HTML Code:
<Directory "/home/*/public_html/*">
AllowOverride All
Order Deny,Allow

[Code].....

View 7 Replies View Related

Programming :: Batch Process Files In VI?

May 29, 2010

I'm completely new to scripting and I'm trying to figure out how to write a script that will get a list of all the files in a directorywn through any subdirectories.When I have the list I want to o each file in VI and change the fileformat. So far all I have been able to figure out is that VI can do the batch processing and that "ls -R" gets me the recursive file list. I'm still pretty clueless on how to do the batch process with the VI editor. I think I'm supposed to use the Ex mode but I don't know how to get the list of arguments from the filelist into the editor so they can be processed. If it matters the files were all written in a Windows editor and have gotten the MS carriage returns so I want to do a :set ff=unix command on all the files without having to go into each file manually, there are over 300 files that need updated.

View 3 Replies View Related

Ubuntu :: Gimp Batch Process Multiple Files Index To B&W?

Apr 15, 2010

I scanned hundreds of pages in gray scale and would like to batch process them to B&W. You can do this using the gimp GUI. what it does is get rid of all the gray shading from reflections off the paper when scanned. So you get crisp white backgrounds with black text and diagrams. I would like to simply do this to the entire group directory at one time as it would be quite a lot of effort to open them and do them one by one.

View 3 Replies View Related

Ubuntu Servers :: Server Process Created Files Permissions

Nov 20, 2010

Currently have access to a VPS where we are running a small game server on ubuntu - the problem is that it is a multi-user environment, so when one person restarts the server process, all files it creates are owned by that users name and group. I have created a group called 'game' and added both users to it, but I need to know how to make all files in the game server's directory to be r/w/x for the group 'game'. Currently, I have a script that chowns and chmods all files recursively on startup, but I'd prefer not having to do this.

View 4 Replies View Related

Debian :: Files Deleted But Process Open

Jun 4, 2015

My /dev/md1 is full

Code:

Select all# du -x -m --max-depth=1 | sort -n
shows
Code: Select all0   ./dev
0   ./proc
0   ./sys
1   ./home
1   ./lost+found

[Code] ....

There are files that have been deleted but open processes are still active. The result :

Code:
Select all# lsof | grep 'deleted'
shows
Code: Select allmysqld     2881      mysql    4u      REG                9,1          0     393317 /tmp/ib16UZEE (deleted)
mysqld     2881      mysql    5u      REG                9,1        798     393318 /tmp/ibqA5RvA (deleted)
mysqld     2881      mysql    6u      REG                9,1          0     393319 /tmp/ibfXpKmw (deleted)
mysqld     2881      mysql    7u      REG                9,1          0     393322 /tmp/ibcluSds (deleted)

[Code] ....

If I delete these files does it diminish the size of / var ? If yes, how to remove these and can I remove them ?

View 9 Replies View Related

General :: Determine What Files Are Being Accessed By A Process

Mar 23, 2010

How would I find out all the files a particular process accesses?

I am using Ubuntu 9.04.

View 1 Replies View Related

Programming :: Process Ms Excel Files On Machine?

Mar 2, 2010

Are there any solutions by which linux-based web server frameworks (like zend or any other) can process data inside microsoft excel spreadsheets (*.xls)?

View 1 Replies View Related

General :: Renaming Multiple Files In Batch Process

Feb 21, 2010

I have some random files in a folder. I want to rename all of the files in a batch process. I have a text file that contains the Currentname of all the files in the folder, as well as a text file with all of the Newname of files in the folder. I want to replace Currentnames with Newnames.

For example, here are the names of the files in the folder:
1.mp4
2.mp4
3.mp4

I have a text file with the Currentname of all the files in the folder:
1.mp4
2.mp4
3.mp4

I have a text file with the proper Newname of the file:
a.mp4
b.mp4
c.mp4

I want to rename Currentname with Newname in the folder. So when I go to the folder the Newname of the files are:
a.mp4
b.mp4
c.mp4

View 14 Replies View Related

Server :: Media Streaming - Process Video Files ?

Feb 1, 2011

I was just wondering if there is a software package that will allow my linux server to process video files (mainly AVI and MKV) so that they can be streamed over the network or Internet. I obviously wouldn't be able to stream files between 600MB and 8GB over the Internet and have it play smoothly. What my plan is to setup something so that I can stream my videos over the Internet when I am not home. Can anyone point me in the right direction?

Or maybe there's a software that can break the video file into "parts" and only send out blocks at specific intervals?

View 2 Replies View Related

Software :: Seeking Tools To Process Email Files?

Feb 26, 2010

I have all of these "archival" email messages and attachments. Most are Mozilla Thunderbird format. Others are Evolution format. Some are win-dose. Most are linux. Where can I find software that will me format, organize, store, and retrieve email messages for long term archives? I'd like to collect all of each thread together with any of the relevant attachments. I'd like something that is searchable. I'd like something that is "pretty print-able" -- PDF or similar -- should I want to share an historical thread with others. I suspect there are commercial-grade, "compliance oriented" application suites for message and document storage.

View 1 Replies View Related

Programming :: Write A Script (possibly Awk) That Is Able To Process 2 Files?

Oct 7, 2010

I need to write a script (possibly awk) that is able to process 2 files, but I am very new to awk and I have problems in how to process 2 files at the same time.The first input file is samples.txtthe formattime_instant measure

Code:
903.0 -
906.43 18.4

[code]....

View 2 Replies View Related

Ubuntu Installation :: How To Ensure That Programs / Download Files Remain Intact Following Process

Jun 2, 2011

Have used 10.04 for almost a year now, and the 'upgrade' now beckons.How can I ensure that my programs and Download files remain intact following the process? I already have 11.04 as an .iso on cd, but am unsure how to proceed.

View 3 Replies View Related

Fedora :: Files Downloaded By Preupgarde Were Used As Almost No Connections To The Net During The Upgrade Process?

Nov 8, 2010

I just upgraded from F12 to F13 and the result is a mess. From F11 to F12, I*used preupgrade and it worked flawlessly. This time, the process ended on a blank screen. So, I downloaded the DVD and I suppose the files downloaded by preupgarde were used as there were almost no connections to the net during the upgrade process. The problem now is that apparently almost all the FC12 files are still on my system:

rpm -qa | grep fc12
telepathy-stream-engine-0.5.11-1.fc12.x86_64
pbm2l2030-1.4-5.fc12.x86_64
keyutils-libs-1.2-6.fc12.x86_64
apr-util-ldap-1.3.10-1.fc12.x86_64
iwl4965-firmware-228.61.2.24-2.fc12.noarch
rdiff-backup-1.2.8-3.fc12.x86_64

[Code]...

Of course, as I said, the previous upgrade went flawlessly and I didn't check what happened on the system with the rpm and locate commands but I doubt is looked that bad. Seeing what kind of mess my system was turned into, I now worry about the next upgrade.

View 6 Replies View Related

General :: Process Is Very Timely As Converting Loads Of Avi Files At A Time

Oct 12, 2010

I'm rather new to linux, and I have a dedi server. I know how to browse, install, remove etc, all the basics needed to use it. I've installed flvtool2, memcoder and ffmpeg, and at the moment im converting avi files in to flv. Im then passing metadata using yamdi.

However, this process is very timely as im converting loads of avi files at a time.Im looking for a script, or a way where I can execute one command/script and which will convert all files in the directory I specify, then run those converted files through yamdi.Im guessing it would be some sort of loop, and then changing for each file?

View 6 Replies View Related

OpenSUSE :: Backup Important Files - Automate The Process Using Rsync And Cron

Aug 14, 2011

I would like to backup important files (totaling about 400GB) on my ext 4 RAID 5 array to an ext4 external hard drive over USB (external drive is mounted to /mnt. In the future I'd like to automate the process using rsync and cron so for now I'm using rsync to transfer the files. My problem is that using the rsync command like this: # rsync -Pr "/dir1" "/dir2" "/dir3" "/dir4" /mnt

rsync shows me the checks and transfers for awhile and then throws up an i/o error (wish I had a screenshot to show but I don't). When I ls /mnt I get a similar i/o error. I then check /dev for the drive and find that it no longer shows up. Originally the partition was /dev/sdc1. I tried unplugging the USB at this point, plugging it back in and mounting the drive back to /mnt, however it has now assigned it to (you guessed it) /dev/sdd1. I get the drive mounted and try the original rsync command again, hoping the first error was a fluke or some kind of one-time drive fart. This time it makes it quite a bit further and then throws up the exact same problem. Am I doing something terribly wrong here? As I said, I'm very new to bash so I'm not making some absolutely moronic, newbie mistake.

View 9 Replies View Related

General :: Determine On System Where Process Substitution Creates FIFO Files?

Aug 16, 2011

I'm writing a C++ application and need to work with process substitution in the Bash shell. I'm trying to find a way to validate the paths passed as arguments to my program, some of which point to FIFO files created by process substitution.

Is there a shell (or C++) way that I can check if the system creates these files in /dev/fd or if they are created somewhere else?

View 2 Replies View Related

Slackware :: Delete All .orig Config Files After Slackpkg Update Process?

Dec 8, 2010

How do I delete all the .orig config files after I go throught the following process?

slackpkg update
slackpkg install-new
slackpkg upgrade-all

View 3 Replies View Related

Red Hat / Fedora :: Command To Stop That File/process Or Is It Just Kill The Process To Stop The Process?

Nov 11, 2010

I've some file with .sh extensions that runs some softwares.Now,how do I stop running that filesI know we run the command ./start_tomcat.sh to start the apache.Is there any command to stop that file/process or is it just kill the process to stop the process

View 2 Replies View Related

General :: Bash Shell Script To Check / If Empty Files Are Being Created & Start Process

Jun 25, 2010

I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.

View 9 Replies View Related

General :: Process Billions Of Small Files Using Bash Shell Commands With Limited Memory?

May 26, 2010

I need to process billions of small files using bash shell commands with limited memory size (256MB). If any of those files contain certain "keywords", the file will be removed. I tried with command:

find . -type f -exec grep -i -l -H "keyword" '{}' + | xargs rm -rf

where all files are located within the current directory. But the command above failed in "out of memory".

View 1 Replies View Related

Programming :: Going Through A Multi-step Process To Produce Output Files, Which Involves 25,000 Greps At One Stage?

Nov 8, 2010

I am going through a multi-step process to produce output files, which involves 25,000 greps at one stage. While I do achieve the desired result I am wondering whether the process could be improved (sped up and/or decluttered).input 1set of dated files called ids<yyyy><mm> containing numeric id's, one per line, 280,000 lines in total:

Code:
123456
999996

[code]....

View 14 Replies View Related

Ubuntu Installation :: Process Hanging For ~24 Hours With "copying Files" At 63%

Aug 23, 2010

I am installling ubuntu on my old (2003) Dell D800 laptop with celeron processor, using a CD (burned at home). The installation process is hanging for about 24 hours now; it says "copying files..." with progress at 63%. The progress has not changed for about 10 hours.

I have a single hard drive on the machine (... noticed issues with dual drives on this forum, so thought I'd mention).

View 1 Replies View Related

General :: Kills A Process Internally Or From Where It Picks File To Continue Its Process?

Jan 8, 2010

one tell me the internal working of kill command. that is how it kills a process internally or from where it picks file to continue its process.

View 3 Replies View Related

General :: Elevate The Priority Of A Process Without Process Superuser Rights?

Jan 21, 2011

I have a high priority service that I start with sudo nice -n -10 process. This process does not need superuser rights though, except for the priority elevation. But nice requires superuser privileges to elevate priority.

View 3 Replies View Related

General :: How To Identify Raid Degrade Process / How To Rebuilt Process

Jun 12, 2010

send the details raid configuration how to use in linux el5 and how to indentify the raid degrade process and how to rebuilt the process.

View 4 Replies View Related

General :: Sending Signal From Child Process To Parent Process?

Sep 8, 2010

Code:

#include <stdio.h>
#include <unistd.h>
#include <signal.h>

[code]....

Description of what the code does or what i intended to do:

1. Created a child process from parent process using 'fork()'

2. Sent a signal 'SIGALRM' from child process to parent process using 'sigqueue' function.

(The Third parameter of 'siqueue' function contains the message (message msg) which the child process wants to send to the parent process.'msg' is a stucture instance containing a) pid of child and b) string) 5. Print the 'msg' sent by child process inside the signal handler function 'sig_action_function' of the parent process I am getting some junk value when this line is executed

Code:

printf("%d
",msg->cpid);

I expected to get the pid of child process, which the child process sent to parent process through the signal.

View 3 Replies View Related

General :: Process Scheduler A Part Of Process Queue?

Aug 12, 2010

as we all know Process Scheduler does Process scheduling and its a process as well. I was just wondering that if this happens then the Process "Process Scheduler" should be a part of Process queue as well.

So if there are 5 process are there in Process queue & process scheduler is administrating them then since its also a process, once it puts a process under RUN state it should itself go inside queue because at one instant only one process can get executed on a processor. This is quite confusing for me. Please help me out. I tried to search on this but could not find any relevant topics.

View 1 Replies View Related

General :: Find The Parent Process Of A Zombie Process?

May 4, 2010

How do you find the parent process of zombie processes?

When the child process is something where the parent is not entirely obvious...

Is there some way to list processes in tree format or something?

View 3 Replies View Related

Programming :: Displaying Process Id In Shell Script But There Is No Such Process?

Nov 9, 2010

I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash

result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];

[code]...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved