hi,
I have a 20 line file.
I need a command which will brinf back a specific line based upon the line number I enter.
e.g. the file looks like this and is called file1
jim is a man
john is a woman
james is a man
wendy is a woman
lesley is a woman
i want a command that will... (4 Replies)
I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Aloha! I have just over 1k of users that have permissions that they shouldn't under our system. I need to parse a provided list of usernames, check their permissions file, and strip the permissions that they are not allowed to have. If upon the permissions strip they are left with no permissions,... (6 Replies)
Hi,
I understand either AWK or SED can do this, but I not sure how to extract the following configuration in section. Meaning when I need to find code with " ip helper-address 192.168.11.2" , it would start from "interface Serial0/0" and "interface FastEthernet0/1". Only displaying both section... (2 Replies)
Is there an awk, sed, vi or any line command that adds Field Separators (default spaces) to each line in a file?
$cat RegionalData
12FC2525MZLP8266900216
12FC2525MZLP8266900216
12FC2525NBLP8276900216
12FC2525NBLP8276900216
Desired results:
1 2 F C 2525 MZ LP 826 690 02 16
1 2 F C... (2 Replies)
I have searched in a variety of ways in a variety of places but have come up empty.
I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
I can obtain information from itdt inventory command however it display as below, I'd like to print each entity on one line but seperated by :
the file is something like and each section ends with Volume Tag
Drive Address 256
Drive State ................... Normal
ASC/ASCQ... (3 Replies)
In the awk below I am trying to parse the Sample Name below the section. The values that are extracted are read into array s(each value in a row seperated by a space) which will be used later in a bash script. The awk does execute but no values are printed. I am also not sure how to print in a row... (1 Reply)
Hi Gurus,
I have below file which has different sections, need to move the sections to beginning of the each record.
original file
aaa
bbb
ccc
ddd
eee
fff
output file.
aaa
bbb
ccc
ddd
eee
fff (6 Replies)
Discussion started by: green_k
6 Replies
LEARN ABOUT NETBSD
iscsi-initiator
ISCSI-INITIATOR(8) BSD System Manager's Manual ISCSI-INITIATOR(8)NAME
iscsi-initiator -- refuse-based iSCSI initiator
SYNOPSIS
iscsi-initiator [-46bcDfVv] [-a authentication-type] [-d digest-type] [-h target-hostname] [-p target-port-number] [-t target-number]
[-u username] mount_point
DESCRIPTION
The iscsi-initiator utility can be used to access an iSCSI target, such as iscsi-target(8), to access block storage which has been exported.
Information pertaining to the target is displayed underneath the mount point, along with the device corresponding to the storage which the
target exports.
The various arguments are as follows:
-4 Use an IPv4 connection to the target.
-6 Use an IPv6 connection to the target.
-a authentication-type
Use the specified authentication type when communicating with the target. The possible values are chap, kerberos, srp or none. The
default value is none.
-b Show the storage as a block device.
-c Show the storage as a character device.
-d digest-type
Use the specified digest type when communicating with the target. The possible values are header, data, both, all or none. The
default value is none.
-D List the LUNs on the specified target and exit (i.e. do discovery only)
-f Show the storage as a regular file.
-h hostname
Connect to the iSCSI target running on the host specified as the argument.
-p port-number
Connect to the iSCSI target running on the port specified as the argument. The default value is 3260.
-t target
Connect to the number of the iSCSI target running as the argument.
-u username
Use the specified user's credentials when logging in to the iSCSI target. There is no default.
-V Print out the version number and then exit.
-v Be verbose in operation.
The refuse(3) library is used to provide the file system features.
The mandatory parameter is the local mount point.
This iSCSI initiator presents a view of the targets underneath the mount point. Firstly, it creates a directory tree with the hostname of
the target, and, in that directory, a virtual directory is created for each target name exported by the iSCSI target program. Within that
virtual target directory, symbolic links exist for the hostname (for convenience), a textual representation of the IP address, the iSCSI tar-
get product name, the iSCSI target IQN, the iSCSI target vendor and version number. One other directory entry is presented in the virtual
target directory, relating to the storage presented by the iSCSI target. This can be in the form of a regular file, which is also the
default, a block device or a character device.
Please note that the iscsi-initiator utility needs the ``puffs'' kernel module loaded via modload(8) to operate.
EXAMPLES
# ./iscsi-initiator -u agc -h iscsi-target0.alistaircrooks.co.uk /mnt
# ls -al /mnt/target0
total 576
drwxr-xr-x 2 agc agc 512 May 11 22:24 .
drwxr-xr-x 2 agc agc 512 May 11 22:24 ..
lrw-r--r-- 1 agc agc 39 May 11 22:24 hostname -> iscsi-target0.alistaircrooks.co.uk
lrw-r--r-- 1 agc agc 14 May 11 22:24 ip -> 172.16.135.130
lrw-r--r-- 1 agc agc 16 May 11 22:24 product -> NetBSD iSCSI
-rw-r--r-- 1 agc agc 104857600 May 11 22:24 storage
lrw-r--r-- 1 agc agc 43 May 11 22:24 targetname -> iqn.1994-04.org.netbsd.iscsi-target:target0
lrw-r--r-- 1 agc agc 8 May 11 22:24 vendor -> NetBSD
lrw-r--r-- 1 agc agc 4 May 11 22:24 version -> 0
#
SEE ALSO puffs(3), refuse(3), iscsi-target(8)HISTORY
The iscsi-initiator utility first appeared in NetBSD 6.0. An earlier version called iscsifs was available in NetBSD 5.0 in source format
only.
AUTHORS
The iscsi-initiator utility was written by Alistair Crooks <agc@NetBSD.org>.
BUGS
iscsi-initiator currently only supports a CHAP challenge length of 16 octets. Other initiators support up to 1024 and thus it is expected
that most targets will also support such lengths. This means that CHAP compatibility with other targets apart from iscsi-target(8) is likely
to be poor. To workaround this, please use authentication type none by not specifying a username with the -u option.
BSD February 22, 2011 BSD