I have created customized scripts to start httpd and postgres (For CentOS 6) in /etc/init.d. However for it to work even after reboot, I have to put the script in /etc/rc.d/rc0.d, rc1.d, etc.
However, the naming convention for the scripts, for eg, in the directory rc0.d is like this :
How do I know what number to put for my script? Like K16.....etc.
All right. Heres the deal, I need to know everysingle command or funtion there is to create a new c file (file.c). Heres the catch: I cannot use text editors!!!:mad:
I heard of a "gcc" command is that any good?:confused:
Thanks..:cool: (2 Replies)
I am trying to create a application in OSX through UNIX that will run a script to mount an image from a CD-ROM and run the application which it corresponds to, all with double clicking on a icon in OSX. Any thoughts or ideas?
-Mad (3 Replies)
I need to automate the following process:
I have a list of ip address for printers in a file called iplist.txt, I need to take that list and run the command
snmpget -v 1 -c public ip address sysName.0
for each ip address to see if the printer is running snmp, I want to the create a file... (4 Replies)
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Hi everyone
I’m not a programmer and my knowledge of scripting is very poor, now I’m stock in a task at work and would really appreciate it if someone could help me out.
Here is the problem:
1. I have a file with 9 million entries that look like this :
611424167
610864581
611881523
609585386... (3 Replies)
Alright, well I did some more research since I originally posted this thread, and as much as I'd like to delete it, I can't, so I'll just extend my initial question a little.
Right now I have 3 scripts:
1#!/bin/bash
# script1 - Write all files modfied x days ago
find .. -daystart -mtime 0... (2 Replies)
Hi all
i am struggling in creating a restore of env files while doing applications clone.
the first file i created for copying the important configurations file
which is running perfect
now for reverting the changes i mean when i am restoring these files to its original places
i have to do... (7 Replies)
Hi all,
I have a PLSQL script which has a IN list where it takes some ids as input. For example
SELECT * FROM EMPLOYEE WHERE EMPLOYEE_ID IN (comma separated list )
I want to run this quest inside a shell script but I would like to prepare the IN list dynamically where the employee ids... (1 Reply)
Hi everyone,
I am completely new to this forum and I have some questions regarding a script I am writing. I would be happy if anyone could help me with the small and precise script which should include if, then, else, while until, case and select.
The scenario is as follows:
1) A user... (3 Replies)
Discussion started by: codenotfound
3 Replies
LEARN ABOUT DEBIAN
st_snapshot
ST_SNAPSHOT(1) systraq ST_SNAPSHOT(1)NAME
st_snapshot - calculate checksum and stat ownership and permissions of files
SYNOPSIS
ST_SUM=sha256sum st_snapshot patterns homepatterns
DESCRIPTION
st_snapshot calculates checksums and stats ownership and permissions of critical system files.
This script is typically run in either root-mode or public-mode. Running this script in root-mode requires root priviliges. One is
adviced to set up a dedicated user account for running this script in public mode.
In root-mode, the files snapshot_root.list and snapshot_root.homelist are typically passed as arguments. These pattern files are read by
the script and contain names of files and directories; listing a directory in such a pattern file is equivalent to listing all files which
live in the directorytree with this directory as root.
snapshot_root.list could e.g. read
# snapshot_root.list - files and directories we wanna get
# monitored: we wanna get a note once these files, or any file
# under these directories, gets created, gets rm-ed, gets
# permissions or contents changed. these notices will not
# include the possibly secret contents of these files
#
# this file gets read by st_systraq
/etc/group
/etc/gshadow
/etc/hosts.allow
/etc/hosts.deny
/etc/hosts.equiv
/etc/lilo.conf
/etc/passwd
/etc/postfix/server.pem
/etc/shadow
/etc/skel
/etc/ssh
Equivalent files snapshot_pub.list and snapshot_pub.homelist should be on the system. These files should contain all worldreadable to be
monitored files. This allows for running this script as root only in those cases where it's needed: when reading files, readable for root
only.
The homelist files contain files and directories which should get monitored for every homedirectory on the system. snapshot_pub.homelist
could e.g. contain:
.profile
.cshrc
.tcshrc
.login
.logout
.bash_profile
.bashrc
.exrc
.nexrc
As a special case, when the environment variable ST_OPHOMES is set to a non-empty string (typically when running in public mode), we stat
the permissions on all homedirectories themselves.
The produced snapshot is printed to stdout. The output when running in public mode could look like:
# ownership and permissions of homedirs
drwxr-xr-x root root /bin
drwxr-xr-x root root /dev
drwxr-sr-x root staff /home
drwxr-sr-x joostvb joostvb /home/joostvb
drwxr-xr-x root root /usr/sbin
drwxr-xr-x root root /var
# sha256sum of critical pub files
4d3cd13d6dbc10e2e3ccb9477cbc9eb9b76302454c276d5771ae0b10a5fbb4d2 /home/joostvb/.ssh/id_rsa.pub
eb8d83e0246f761a21bdfb13a03fac634ed7c3b7dde4c2efddd7b2838d32596f /var/qmail/alias/.bashrc
4e371f9a11f5a2464d3d5c952e58e24f73b377d33767ed93b2082fcb59a647fe /etc/zlogin
# ownership and permissions of critical pub files
-rw-rw-r-- joostvb joostvb /home/joostvb/.ssh/id_rsa.pub
-rw-r--r-- joostvb joostvb /home/joostvb/.ssh/authorized_keys
ENVIRONMENT
ST_OPHOMES - non-empty in case permissions on all homedirectories should be printed
ST_SUM - command for calculating file checksums. E.g. sha256sum, sha512sum, sha384sum, sha224sum or sha1sum.
SEE ALSO
The systraq manual.
VERSION
This manpage: $Id: st_snapshot.pod 374 2008-12-14 08:47:32Z joostvb $
COPYRIGHT
Copyright (C) 2001, 2002, 2003, 2004, 2008 Joost van Baal
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
AUTHOR
Joost van Baal <joostvb-systraq-20041015@mdcc.cx>
20081217 2008-12-15 ST_SNAPSHOT(1)