Sponsored Content
Top Forums Shell Programming and Scripting Cd to another directory to view a log file Post 303024864 by simpsa27 on Thursday 18th of October 2018 09:55:31 AM
Old 10-18-2018
Fantastic!

What was I doing wrong?

Code:
logdir='/opt/product/apachetomcat/8080/8.5.5_8080/apache-tomcat-8.5.5/logs'
cd "$logdir"

last_install=`sort -rn $(ls -c localhost_access_log.*.txt | head -n 1) | sed -r '/HTTP\/1\.1" [0-9]+ [0-9]+ [0-9]$/d' | head -n 1 | grep POST | sed -e 's|^.*\s\(.*\)$|\1|'`

echo $last_install

2308
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to view contents of a directory

Hi, first post here be gentle. Very new to Unix. Using HP-UX 10.20 I CD into a remote directory on one machine $ cd /net/remote hostname yet when I do an ll in this directory none of the contents appear. It just is empty. when I do the same command from another machine, $ cd... (13 Replies)
Discussion started by: maddave
13 Replies

2. UNIX for Dummies Questions & Answers

view user permissions on directory

Hello, and thanks in advance- I just installled red hat and pinged my machine and got a reply. When i go to http://myIPhere from my other machine it asks for a password and username. It doesnt accepts the username and passwords I use to login to my linux box. I therefore think its a premissions... (1 Reply)
Discussion started by: 99miles
1 Replies

3. UNIX for Advanced & Expert Users

Can't view directory content - SUNOS

Hi, The app I support has a directory used for debugg files. It has just come to light there are no files in there. Or is there :confused: Changing into the directory and completing an ls -lta you get no files. This is truly not right for the application. If I go up one directory the... (2 Replies)
Discussion started by: nhatch
2 Replies

4. Linux

Unable to view files in a particular directory under /opt

Hi Everybody, I am Unable to view files in a particular directory under /opt. But, when I reboot the server, I am able to view the files.. Its happening daily. Do u 've n e answers/suggestions. Kindly help.. :confused: (1 Reply)
Discussion started by: its.simron
1 Replies

5. UNIX for Dummies Questions & Answers

Unable to view files in a particular directory under /opt

Hi Everybody, I am Unable to view files in a particular directory under /opt. But, when I reboot the server, I am able to view the files.. Its happening daily. Do u 've n e answers/suggestions. Kindly help.. :eek: (1 Reply)
Discussion started by: its.simron
1 Replies

6. Shell Programming and Scripting

Command to view files in Directory

Hi, Can you help me in providing me a command to view all files present in a directory. Thanks a lot. -Vamsi (1 Reply)
Discussion started by: VamsiVasili
1 Replies

7. Shell Programming and Scripting

Command to view files in Directory

Hi, Can u provide me the command to view files in a directory.Urgent Pls. -Vamsi (4 Replies)
Discussion started by: VamsiVasili
4 Replies

8. Shell Programming and Scripting

Last modified time of the folder is changing when I view the file inside the directory

Hi., Last modified time of the folder is changing when I view the file inside the directory. Here is the test on sample directory. I believe that ls -l commands gives the time detail w.r.t last modified time. Pl. suggest. bash-3.2$ mkdir test bash-3.2$ cd test bash-3.2$ touch myfile.txt... (2 Replies)
Discussion started by: IND123
2 Replies

9. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

10. UNIX for Advanced & Expert Users

Using vim to view the contents of a directory

When I use this command: vi /home/bob/.vimI expect to see. " ============================================================================ " Netrw Directory Listing (netrw v149) " /home/bob/.vim " Sorted by name " Sort sequence:... (4 Replies)
Discussion started by: cokedude
4 Replies
RATPROXY(1)							   User Commands						       RATPROXY(1)

NAME
ratproxy - a passive web application security assessment tool SYNOPSIS
ratproxy [-w logfile] [-v logdir] [-p port] [-d domain] [-P host:port] [-xtifkgmjscael2XCr] DESCRIPTION
Ratproxy is a semi-automated, largely passive web application security audit tool. It is meant to complement active crawlers and manual proxies more commonly used for this task, and is optimized specifically for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments. OPTIONS
-w logfile - write results to a specified file (default: stdout) -v logdir - write HTTP traces to a specified directory (default: none) -p port - listen on a custom TCP port (default: 8080) -d domain - analyze requests to specified domains only (default: all) -P host:port - use upstream proxy for all requests (format host:port) -r - accept remote connections (default: 127.0.0.1 only) -l - use response length, not checksum, for identity check -2 - perform two, not one, page identity check -e - perform pedantic caching headers checks -x - log all XSS candidates -t - log all directory traversal candidates -i - log all PNG files served inline -f - log all Flash applications for analysis (add -v to decompile) -s - log all POST requests for analysis -c - log all cookie setting URLs for analysis -g - perform XSRF token checks on all GET requests -j - report on risky Javascript constructions -m - log all active content referenced across domains -X - disruptively validate XSRF, XSS protections -C - try to auto-correct persistent side effects of -X -k - flag HTTP requests as bad (for HTTPS-only applications) -a - indiscriminately report all visited URLs EXAMPLES
Example settings suitable for most tests: 1) Low verbosity : -v <outdir> -w <outfile> -d <domain> -lfscm 2) High verbosity : -v <outdir> -w <outfile> -d <domain> -lextifscgjm 3) Active testing : -v <outdir> -w <outfile> -d <domain> -XClfscm Multiple -d options are allowed. Consult the documentation for more. AUTHOR
ratproxy is written and maintained by Michal Zalewski <lcamtuf@google.com> This manual page was generated via help2man by Iustin Pop <iusty@k1024.org> for the Debian project (but may be used by others). SEE ALSO
ratproxy-report(1) ratproxy 1.56-beta April 2009 RATPROXY(1)
All times are GMT -4. The time now is 02:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy