To replicate above output, try lsof is installed from its own package on my Ubuntu distro. man lsof:
Quote:
NAME
lsof - list open files
.
.
.
DESCRIPTION
Lsof revision 4.91 lists on its standard output file information about files opened by processes for the following UNIX dialects:
Apple Darwin 9 and Mac OS X 10.[567]
FreeBSD 8.[234], 9.0 and 1[012].0 for AMD64-based systems
Linux 2.1.72 and above for x86-based systems
Solaris 9, 10 and 11
I am on a HP-UX machine I have a directory called "/u01/blobs" and the files look like this:
ls -1
7398
7399
7400
I need to produce a comma delimited file with the following format:
filename,location/filename
i.e:
7398,/u01/blobs/7398
7399,/u01/blobs/7399
7400,/u01/blobs/7400
What... (3 Replies)
Hello guys, thank God that I found this forum.
I hope that someone can help me because I don't have any idea on how to start it. I know that for some of you this is a very simple task but I'm not as advance on shell scripting like many people out there.
I got this file with a permanent... (10 Replies)
Hello all.
I am new to this forum (and somewhat new to UNIX / LINUX - I started using ubuntu 1 year ago).:b:
I have the following problem that I have not been able to figure out how to take care of and I was wondering if anyone could help me out.:confused:
I have all of my music stored in... (7 Replies)
Hi guys, I am a newbie here :wall:
I need a script that can search for a file in a directory and copy the contents of that file in a new file.
Please help me. :confused: Thanks in advance~ (6 Replies)
I hope some one can help me
I have multiple files in a directory with out extension like as below mentioned. But i want to change all the file names along .DDMMYYYYHHMISS format. And all files should have same DDMMYYYYHHMISS.
Scenario:
direcory name = /vol/best/srcfiles
files in a... (4 Replies)
I have to write a script to rename the every last sub-directory in a directory structure if the last sub-directory name doesn't contain "submitted".
eg:
given directory path:/u01/home/somedir
somedir can have many subdirectories and each subdirectory inturn has many subdirectories.
somedir... (3 Replies)
Hello All,
Can you help me in writing a script for reading the specific position data in a file and if that data found in that file that particular file should be renamed.
Ex: Folder : C:\\test
and Filename : CLSACK_112214.txt,CLSACK_112314.txt,CLSACK_112414.txt
Contents in the file would... (3 Replies)
I am trying to use the two files shown below to either remove or rename contents in one of those files. If in file1.txt $5 matches $5 of file2.txt and the value in $1 of file1.txt is not "No Match" then that value is substituted for all values in $5 and $1 of file2.txt. If however in $1 ... (5 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Hi All,
Just started learning unix and stuck into below issue.
Suppose i have folder structure as below.
Dir1/Dir2/Dir3/File1.msg
I am looking to rename the file name from File1.msg to File2.msg but from the parent Dir1
From Dir3 i can easily run the command like
mv File1.msg... (2 Replies)
Discussion started by: Gurjeet Singh
2 Replies
LEARN ABOUT DEBIAN
checkrestart
checkrestart(1) debian-goodies checkrestart(1)NAME
checkrestart - check which processes need to be restarted after an upgrade
SYNOPSIS
checkrestart [ -hvpa ] [ -b blacklist_file ] [ -i package_name ]
DESCRIPTION
The checkrestart program tries to determine if there are processes in the system that need to be restarted after a system upgrade. This is
necessary since an upgrade will usually bring new system libraries and running processes will be still using the old versions of the
libraries. In stable Debian GNU/Linux systems this is typically needed to eliminate a system exposure to a vulnerability which might have
been fixed by upgrading a library which that process makes use of.
Consequently, checkrestart is sometimes used as an audit tool to find outdated versions of libraries in use, particularly after security
upgrades. Administrators should not, however, rely on its output completely (see BUGS below).
This script needs to run as root in order to obtain the information it needs for analysis.
OPTIONS -h,--help
Show the program help and exit.
-v,--verbose
Generate detailed output. This output includes the list of all processes found using deleted files or descriptors as well as the
deleted files and descriptors found.
-p,--package
Only process deleted files that belong to a package, ignoring deleted files which do not have an associated package in the package
system.
-a,--all
Process all deleted files regardless of location. This makes the program analyse deleted files even if they would be discarded
because they are located in locations, such as /tmp , which are known to produce false positives. It will take preceded if used
simultaneously with the -p option.
-b file,--blacklist=file
Read a blacklist of regular expressions from file. Any files matching the patterns will be ignored.
-i name,--ignore=name
Ignore services that are associated to the package name provided in name.
EXIT STATUS
The program will exit with error (1) if a non-root user tries to run it. Otherwise, it will always exit with error status 0.
BUGS
This program might fail if the output of the lsof utility changes since it depends on it to detect which deleted files are used by pro-
cesses. It might also output some false positives depending on the processes' behaviour since it does not check yet if the (deleted) files
in use are really libraries.
If you find a false positive in checkrestart please provide the following information when submitting a bug report:
-- The output of checkrestart using the -v (verbose) option.
-- The output of running the following command as root:
lsof | egrep 'delete|DEL|path inode'
Checkrestart is also sensitive to the kernel version in use. And might fail to work with newer (or older) versions.
A rewrite to make it less dependent on lsof could improve this, however.
SEE ALSO lsof(8)AUTHOR
checkrestart was written by Matt Zimmerman for the Debian GNU/Linux distribution.
COPYRIGHT AND LICENCE
Copyright (C) 2001 Matt Zimmerman <mdz@debian.org> Copyright (C) 2007,2010-2011 Javier Fernandez-Sanguino <jfs@debian.org>
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, or (at your option) any later version.
On Debian systems, a copy of the GNU General Public License may be found in /usr/share/common-licenses/GPL.
debian-goodies December 19 2006 checkrestart(1)