background preloader

Developer

Facebook Twitter

File test operators. Returns true if...

File test operators

-e file exists -a This is identical in effect to -e. It has been "deprecated," and its use is discouraged. -f file is a regular file (not a directory or device file) -s file is not zero size -d file is a directory -b file is a block device -c file is a character device -p file is a pipe -h file is a symbolic link file is a symbolic link file is a socket -t file (descriptor) is associated with a terminal device This test option may be used to check whether the stdin [ -t 0 ] or stdout [ -t 1 ] in a given script is a terminal.

-r file has read permission (for the user running the test) -w file has write permission (for the user running the test) -x file has execute permission (for the user running the test) Linux: Kill multiple processes with one single command. Some time you may need to kill a certain number of processes initiated by any application in Linux.

Linux: Kill multiple processes with one single command

To kill a process you have to provide the process id to the "kill" command and the process should be terminated. In this post I will demonstrate how to kill multiple processes with one command. I have an oracle instance running with the name "oraxpo". The following command will show all running processes where the term "oraxpo" is used in the process name. $ ps -ef | grep oraxpo oracle 4663 1 0 18:18 ? Now to kill a process we need to provide the process id which are shown in the second column of above output. This way we can kill all process but the problem is that we will have to provide all process id's to the "kill -9" command separated with a space. e.g. to kill first three process we will use "kill -9 4663 4665 4667".

The following command prints the second column in the output of processes which contains oraxpo in their name. Hexadecimal conversion, convert decimal to hexadecimal.

Counting the number of physical CPUS

Configure your System. Android apps. OS. GNU Make - Overview of @code{make} Go to the next section.

GNU Make - Overview of @code{make}

@shorttitlepage GNU Make Copyright (C) 1988, '89, '90, '91, '92, '93, '94 Free Software Foundation, Inc. Published by the Free Software Foundation 675 Massachusetts Avenue, Cambridge, MA 02139 USA Printed copies are available for $20 each. ISBN 1-882114-50-7 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cover art by Etienne Suvasa. Makefile Tutorial. Compiling your source code files can be tedious, specially when you want to include several source files and have to type the compiling command everytime you want to do it. Well, I have news for you...

Your days of command line compiling are (mostly) over, because YOU will learn how to write Makefiles. Makefiles are special format files that together with the make utility will help you to automagically build and manage your projects. For this session you will need these files: I recommend creating a new directory and placing all the files in there. note: I use g++ for compiling. The make utility If you run make this program will look for a file named makefile in your directory, and then execute it.

Makefiles in Linux: An Overview. Download samples in ZIP format - 9.45 KB Introduction Small C/C++ applications with a couple of modules are easy to manage.

Makefiles in Linux: An Overview

Developers can recompile them easily by calling the compiler directly, passing source files as arguments. That is a simple approach. However, when a project gets too complex with many source files it becomes necessary to have a tool that allows the developer to manage the project. The tool I'm talking about is the make command. This article is not a full tutorial, it focuses on C applications and how to use the make command and makefile to build them. Download make_samples.zip.

Contents . Make command syntax is: make [options] [target] You can type make --help to see all options make command supports. Make requires a makefile that tells it how your application should be built. Make -f run.mk -f option tells make command the makefile name that should be processed. There are also two special names that makes -f option not necessary: makefile and Makefile.

Programming Languages

AI. Algorithms. Databases. Embedded Systems. Install. C & C++ Python. Java. Web.