hello
Sorry but i don't understand very well the lsof command with the man.
Can you explain to me what is the use of this command ?
thank you (2 Replies)
Using lsof command i can find out which process-id is associated with the port.
lsof -i :51000
. But as part of process i cant have lsof in the server.
I am using sun solaris 8 and only kshell. Is there a way to find out which process is using the above port. as of now i am gettn port... (1 Reply)
Hi All,
i want the last login details along with year.
i tried below command but not giving me the year of last login.
last <$Userid> | head -1
i heard that if it is current year then it wont display the year else it will display the year. is it so?
if yes then , is there any way of... (1 Reply)
Hi All,
i want the last login details along with year.
i tried below command but not giving me the year of last login.
last <$Userid> | head -1
i heard that if it is current year then it wont display the year else it will display the year. is it so?
if yes then , is there any way of... (1 Reply)
Hello,
i am developing a simple shell script for simulation of wc command but it's not working.Please tell me what is the problem. I have commented the problematic line
if
then
echo "<Improper Usage>"
echo "wcassg <options> file"
else
eval file=\$$#
if
then
chars=0
words=0... (2 Replies)
Hi,
Can anyone explain me the difference between fsuer and lsof commands. As per my knowledge both the commands are used to find the processes used by the current file system or user. Apart from that what is the major difference between these commands (3 Replies)
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Hi,
i have a source file and have 3 columns and separated by "|" .i want to split this 3 columns in different variable.When i am executing this values indivisually giving correct result but when the same execute inside a for loop,it's giving issues.
Src file(jjj.txt)
-------... (8 Replies)
Hi,
I am trying to find the files in a specific directory that are currently in open state. I need this information to archive the old files that are not active in the directory.
I get the following output when I try the command $ lsof +d '/var/tmp/'|awk '{print $9}'|sort -u
NAME... (1 Reply)
Discussion started by: ryzen7
1 Replies
LEARN ABOUT REDHAT
losetup
LOSETUP(8) MAINTENANCE COMMANDS LOSETUP(8)NAME
losetup - set up and control loop devices
SYNOPSIS
losetup [ -e encryption ] [ -o offset ] loop_device file
losetup [ -d ] loop_device
DESCRIPTION
losetup is used to associate loop devices with regular files or block devices, to detach loop devices and to query the status of a loop
device. If only the loop_device argument is given, the status of the corresponding loop device is shown.
OPTIONS -d detach the file or device associated with the specified loop device.
-e encryption
enable data encryption. The following keywords are recognized:
NONE use no encryption (default).
XOR use a simple XOR encryption.
DES use DES encryption. DES encryption is only available if the optional DES package has been added to the kernel. DES encryption
uses an additional start value that is used to protect passwords against dictionary attacks.
-o offset
the data start is moved offset bytes into the specified file or device.
RETURN VALUE
losetup returns 0 on success, nonzero on failure. When losetup displays the status of a loop device, it returns 1 if the device is not con-
figured and 2 if an error occurred which prevented losetup from determining the status of the device.
FILES
/dev/loop0,/dev/loop1,... loop devices (major=7)
EXAMPLE
If you are using the loadable module you must have the module loaded first with the command
# insmod loop.o
The following commands can be used as an example of using the loop device.
dd if=/dev/zero of=/file bs=1k count=100
losetup -e des /dev/loop0 /file
Password:
Init (up to 16 hex digits):
mkfs -t ext2 /dev/loop0 100
mount -t ext2 /dev/loop0 /mnt
...
umount /dev/loop0
losetup -d /dev/loop0
If you are using the loadable module you may remove the module with the command
# rmmod loop
RESTRICTION
DES encryption is painfully slow. On the other hand, XOR is terribly weak.
AUTHORS
Original version: Theodore Ts'o <tytso@athena.mit.edu>
Original DES by: Eric Young <eay@psych.psy.uq.oz.au>
Linux Nov 24 1993 LOSETUP(8)