fstab is a configuration
file that contains information
of all the partitions and storage devices
in your computer.
The file is located under /etc,
so the full path
to this file is /etc/fstab.
The >>>>> characters would be replaced by some texts.
For example if i run a shell script,
Code:
./run.sh sometexts infile
Output would be:
Code:
fstab is a configuration
file that contains information
of all the partitions
sometexts
and storage devices
in your computer.
The file is located under /etc,
so the full path
to this file is /etc/fstab.
Hello. Trying to insert text at line 1 and after last line of file. I have searched posts but nothing seems to work. I keep getting extra characters error or nothing gets inserted into the file.
#!/bin/sh
touch textfile.txt
sed 'i\
Add this line before every line with WORD' textfile.txt
... (5 Replies)
Can someone help me on this?
I'm creating an Insert stmt script but Oracle does not accept blanks values. How can I insert the word null between two commas? I'm guessing awk or sed.
Is there a good post or site with easy to understand info on awk and sed? I'm really new to unix scripts :D
... (5 Replies)
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
Hi All,
Can someone pls help me to insert some text on a file.
my file contains something like below..
AKBULBU,
BALUMIL,
BATCH,BATCH
BOARROB,
BOTAKAT,
C57896,
CAKIOZE,
CHECMER,
CICOFRA,
CISZPAW,2194485
I want output as
USER_ID, LOGIN_ID (6 Replies)
I need help in bash.
This is the problem
I have a php file that I edit, add a line under another.
PHP file:
<select name="RecPerPage" id="RecPerPage" onchange="this.form.submit();" class="phpmaker">
<option value="50">Select version</option>
</select>
I need insert "<option... (5 Replies)
I need help with this please:
I have this text:
<li><a href="login.php">Ingresar</a>
and I need insert this text below:
<li><a href="http://localhost/dummysila/">anything<a></li>
help please!
Note: all this with bash....command sed I think.... (1 Reply)
Hello,
I've been racking my brain trying to find a good way to accomplish a task. I need to insert a block of text into a file in the format of
FirewallRuleSet proxy-users {
FirewallRule allow to 0.0.0.0/0
}
I need to insert this block of text (which could have sed special... (2 Replies)
Hi I was wondering if anyone new of a solution to this problem? I need to copy a time stamp that is on a line of .text in a text file into multiple positions on the same line.
I need to insert the time stamp on the same line between every occurance of the text ".pdf_.html" right after the... (9 Replies)
Hi,
I am trying to check for missing dates in a file and would want to insert the missing date into the file.
Currently the script is as below
#!/bin/ksh
dates="dates"
cat ${dates} | grep -v "^#"
curr_month=`date '+%m`
curr_day=`date '+%d`
curr_year=`date '+%Y`
#curr_month=02... (7 Replies)
Discussion started by: newbie_01
7 Replies
LEARN ABOUT REDHAT
updfstab
updfstab(8) Red Hat Linux updfstab(8)NAME
updfstab - update /etc/fstab to reflect removable devices
SYNOPSIS
updfstab [-nt] [--usage]
DESCRIPTION
updfstab is designed to keep /etc/fstab consistent with the devices plugged into your system. It looks for devices such as cdroms, zip and
jaz drives, ls120 drives, and digital cameras on the SCSI and IDE buses. USB devices look like SCSI devices to user space, so those are
supported as well, but are only added if they are currently attached to the system (having a scsi device assigned to them is not suffi-
cient).
Devices which updfstab adds to /etc/fstab are marked with the kudzu mount option to distinguish them from other devices. updfstab will not
remove devices from /etc/fstab unless they are marked with the kudzu mount option. It also ignores devices that are already listed in
/etc/fstab, or which have multiple partitions on the media currently inserted.
OPTIONS -c,--config=path
Use the configuration specified by path, rather then /etc/updfstab.conf.
-n,--normalize
Normally, updfstab tries to touch /etc/fstab as little as possible. When this option is given, it will instead move all of the
devices with the kudzu mount option to the end of the file, and will list the devices in the same order the internal probe returns.
-t,--test
When this option is specified, updstab does not update the /etc/fstab file. Instead, it displays the fstab entries it would use to
standard out. If no changes need to be made, it outputs the string (nothing to do) rather then a full filesystem table.
CONFIGURATION
The devices updfstab looks for are specified by its configuration file, /etc/updfstab.conf by default. It defines a number of devices which
updfstab looks for on the system, along with various attributes of that device. If a single device name is given multiple times, later val-
ues override those given earlier. However, match directives accumulate; all specified matches remain in effect for that device. The
default value of flags may be changed by specifying a new value for that flag outside of any device section, which changes the default for
all future devices.
A simple configuration file looks like this:
# sample updfstab configuration file
symlink false
device cdrom {
symlink true
match cdrom
}
device zip {
match hd zip
match floppy "zip"
}
Here two devices are specified, cdrom and zip. If a cdrom device is found on the system, a /dev/cdrom is created pointing to the /dev entry
for the device, and /mnt/cdrom is added to /etc/fstab. The next entry looks for hard drive devices with zip in their description as well as
floppy devices with zip in their description. If either is found /mnt/zip is added to /etc/fstab, but no symlink is created.
Here is the complete list of directives which may be used:
device name
Set attributes for device name name. The name is used in the /etc/fstab entry and for any symbolic links which are created.
include path
Parsing of the current configuration file is stopped, and the file specified by path is read for current configuration information.
Multiple include directives may be given, but they may not appear inside of device sections.
match class string
This directive adds a new rule for this device type; devices found on the system which match this rule are considered a device of
the type whose section the match directive appears in. The class must be cdrom, floppy, or hd. If string appears, it must be a sub-
string of the physical device's description for the rule to match.
nofstab val
If val is true, updfstab does not add a mount entry to /etc/fstab. This is mainly useful in conjunction with symlink.
partition num
Specifies a default partition number which should be mounted from this device. If 0 is used, no partition number appears. updfstab
always scans /proc/partitions for the proper partition number before relying on this value.
skip val
The device entry is skipped. This lets a configuration file undefine a device that was defined earlier (such as in an included
file). val should be true or false.
symlink val
If val is true, updfstab creates a symbolic link in the /dev directory pointing to the actual device. This symbolic link is then
used in /etc/fstab.
FILES
/etc/fstab
/etc/updfstab.conf
/proc/partitions
SEE ALSO kudzu(1)AUTHORS
Erik Troan <ewt@redhat.com>
Red Hat, Inc. 29 Jan 2003 updfstab(8)