There is also an option running in screen session logging the output.
Look for the file $HOME/mysession.log or log/path you require.
You will also benefit in screen if your network connection breaks or similar issues .. turn off putty by accident
The process will continue to run and can be attached again.
It is a great tool and comes on most operating systems.
Hi!
I want to write a script that will create an archive (via tar) that will restrict the size of the tar file. The size can be constrained using the keyword 'k' and providing the size restriction. The problem is that the script needs to know (detect) when the tar command prompts the user (which... (2 Replies)
hi, new to to forum...
i've been trying to create a script in tcsh but i'm having a problem with one thing...
the script has to keep log of it's input and output so i'm using
tee -a log | script | tee -a log
this keeps the logs as asked, but it gives me an extra empty prompt (not in the... (0 Replies)
ok,
i am aware of adding the directory where the files are located into the .profile file but the problem is, its not working for me.
can someone please spell out how to properly edit these configuration files so i can run a command anywhere on the system without having to be in the... (2 Replies)
I create a succesful pkgask 'response' file:
pkgask -r xyz.pkg
I then attempt to use the 'response' file with pkgadd:
pkgadd -nr /home/user/response -d /home/user/xyz.pkg
the prompts for user input still appear. I have also tried an 'admin' file but that still prompts for user input as... (1 Reply)
script1:
#!/bin/ksh
more test.txt
script2: calling the script1
#!/bin/ksh
/tmp/script1.sh 2>&1 | tee tee.log
where test.txt contains ~1200 lines.
When I execute the script2 the more command does not print pagewise it goes to the end of the line, when I remove the tee command it... (4 Replies)
Hi guys.
I m creating scripts which input multiple value , inside sqlplus script when it prompt/accept
do anybody know how to provide multiple value inside sqlplus script when it prompt.
like,
enter value for first:
enter value for second:
enter value "save file as " :
I m try... (11 Replies)
Hi,
Want to log the output of command & check the exit status to find whether it succeeded or failed.
> ls abc
ls: abc: No such file or directory
> echo $?
1
> ls abc 2>&1 | tee log
ls: abc: No such file or directory
> echo $?
0
Tee commands changes my exit status to be always... (7 Replies)
Hi, I'm writing a script,
in the script I need to use tcpdump to capture some packets
however it needs root priviledge
my computer is configured by school and I have no real root priviledge
so I can't use sudo on my computer,like
Code:
sudo tcpdump ......
I have to use a limited... (1 Reply)
In the current directory , I have seven files .
But when I use the following command , it lists eight files ( 7 files + file_list.xtx)
ls -1 | tee file_list.xtx | while read line; do echo $line ; done
Does the tee command create the file_list.xtx file first and then executes the ls -1... (1 Reply)
Hi All,
I am a novice to UNIX, i need to know is there a way to provide 2 inputs when the shell prompts and i need to assign those 2 values to 2 separate variables. I dont want to give those values as a arguments (while running the script).
Thanks in advance!! (1 Reply)
Discussion started by: prasanna2166
1 Replies
LEARN ABOUT DEBIAN
lynis
Lynis(8) Unix System Administrator's Manual Lynis(8)NAME
Lynis - Run an system and security audit on the system
SYNOPSIS
lynis --check-all(-c) [other options]
DESCRIPTION
Lynis is an auditing tool for Unix (specialists). It checks the system and software configuration and logs all the found information into a
log file for debugging purposes, and in a report file suitable to create fancy looking auditing reports. Lynis can be run as a cronjob, or
from the command line. It needs to have full access to the system, so running it as root (or with sudo rights) is required.
The following system areas may be checked:
- Boot loader files
- Configuration files
- Common files by software packages
- Directories and files related to logging and auditing
OPTIONS --auditor <full name>
Define the name of the auditor/pen-tester. When a full name is used, add double quotes, like "Michael Boelen".
--checkall (or -c)
Lynis performs a full check of the system, printing out the results of each test to stdout. Additional information will be saved
into a log file (default is /var/log/lynis.log).
In case the outcome of a scan needs to be automated, use the report file.
--check-update (or --info)
Show program, database and update information
--cronjob
Perform automatic scan with cron safe options (no colors, no questions, no breaks).
--no-colors
Do not use colors for messages, warnings and sections.
--no-log
Redirect all logging information to /dev/null, prevent sensitive information to be written to disk.
--quick (-Q)
Do a quick scan (don't wait for user input)
--quiet (-q)
Try to run as silent as possible, showing only warnings. This option activates --quick as well.
--reverse-colors
Optimize screen output for light backgrounds.
--tests TEST-IDs
Only run the specific test(s). When using multiple tests, add quotes around the line.
Multiple parameters are allowed, though some parameters can only be used together with others. When running Lynis without any param-
eters, help will be shown and the program will exit.
BUGS
There are no known bugs. Bugs can be reported directly to author.
LICENSING
Lynis is licensed under the GPL v3 license and under development by Michael Boelen.
CONTACT INFORMATION
Project related questions and comments should be asked via http://www.rootkit.nl/contact/.
1.08 15 December 2009 Lynis(8)