Executing a command line in a directory and its subdirectories
I'm finally about to make the jump from PHP's mysql driver to the newer mysqli one using the mysqli converter tool.
The tool is called by this command line:
e.g. at the web root:
It's a fast tool and I'm trying to minimize downtime and errors I might make by missing a subdir level.
How would I get a list, starting at /usr/share/nginx/html and drilling down, then feed it to that command line?
Thanks for any pointers.
Last edited by Franklin52; 12-08-2013 at 06:55 AM..
Reason: Please use code tags
Can someone please tell me how to modify/add to this code so that it recognizes UNIX command options (all beginning with "-") and executes the command with options?
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv)
{
int i;
system("stty -echo");
... (8 Replies)
I need to develop a makefile that spans across directories. For example, let's say i have an upper level directory (main) and about 2 subdirectories. I want my .cpp files and .o files to be in one subdirectory. I want my .a files to be in the other subdirectory. The .a files are made up of the... (0 Replies)
Hi Guys.
I am a complete shell scripting newbie with some syntax and commands understanding. I'm more of a win admin. With that said: I need to write a shell script to monitor a directory '/Mon_Dir' for new occurrences of files with .xx extension. Once a new file is detected in the directory, a... (4 Replies)
I'm trying to remove several directories which contains sun-dirs and files inside.
I used the command rm -r <dirname>
But, it always ask "examine file in directory <dirname> yes/no?" line by line.
So, i need to write "y" for every line.
How can i skip this step and remove all directories with... (9 Replies)
Hi,
This is a quick one.
I have got a review comment in one of the scripts that i wrote:
"In UNIX script it not advisable to use cd to a directory and then run command."
Is this true?
I was trying to cd to log directory and use some cat or head or ls command.
Many Thanks,
Sam (2 Replies)
Hello,
I've been trying to run 'ls -1R | wc -l' inside of sub directories to in order to determine how big each folder is.
find . -maxdepth 1 -type d | while read folder
do
cd "$folder" &&
echo "$folder has $(ls -1R | wc -l) files" &&
cd ..
done
or
for... (3 Replies)
Hi,
Is it possible for me to include the results from a command in the subject line? What I am looking to do is get the file count and include it into the subject line as well as the list of files in the body.
Example Subject line: Currently 25 files in directory
My Code:
#!/bin/ksh
cd... (2 Replies)
Hi,
I am a newbie in shell scripting. I have to copy a particular sub-directory (data) from a large no. of directories (all in the same folder) and paste them to another directory ( /home/hubble/data ) and then rename all the subdirectories (data) as the name of its parent directory.
please... (8 Replies)
Hi Forum,
I am using the below command to find files older than x days in a directory excluding subdirectories. From the previous forums I got to know that prune command helps us not to descend in subdirectories. Though I am using it here, not getting the desired result.
cd $dir... (8 Replies)
Discussion started by: jhilmil
8 Replies
LEARN ABOUT MOJAVE
nginx
nginx(1)nginx(1)NAME
nginx - small, powerful, scalable web/proxy server
SYNOPSIS
nginx [options] <configuration file>
DESCRIPTION
Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web
server and as a proxy to reduce the load on back-end HTTP or mail servers.
OPTIONS
A summary of options is included below:
-?,-h Show this help.
-v Show version and exit.
-V Show version and configure options then exit.
-s signal
Send signal to a master process: stop, quit, reopen, reload.
-p prefix
Set prefix path.
-g directives
Set global directives out of configuration file.
-c <configuration file>
Specifies a particular configuration file for nginx to load.
-t Tests nginx configuration and exit.
SEE ALSO
Website: <http://nginx.org/>
AUTHORS
nginx was written by Igor Sysoev <igor@sysoev.ru>.
This manual page was written by Jose Parrella <joseparrella@cantv.net> and
Kartik Mistry <kartik@debian.org>, for the Debian project (but may be used by others).
nginx(1)