I'm trying to write a simple script that takes all the .tar.gz files in a directory and verifies them by using the gzip -tv command:
for zip in *.tar.gz
do
gzip -tv $zip
if ; then #Check return code from tar
echo "File ${zip} verified OK."
exit... (4 Replies)
I have a script that's meant to check the disk usage on a particular volume and delete the oldest logfile if it's over a certain percentage. It runs fine on a Linux machine, but on a Solaris one, I get this error:
diskspace_check.sh: syntax error at line 3: `diskspace=$' unexpected
I assume... (2 Replies)
Hi all,
Am trying to convert a script from ksh to bash :wall:. One of the sub is something like below:
#!/bin/bash
declare -a array01
step_01_test()
{
local count=0
ps -ef | grep watch | grep -v grep | awk '{ print $8 }' | while read line
do
let count=${count}+1
... (1 Reply)
ec2addtag --region us-west-1 vol1234 --tag Name=$nameinst;
It should execute
ec2addtag --region us-west-1 vol1234 --tag Name=webserver;
Instead it thinks that Name is equal to that variable. Please help. Thanks!
Please use code tags! (0 Replies)
Good morning
Recently we needed to change the password from a redhat 6.5 system that no one knew the root password.
Starting the system with the init=/bin/bash method took us to the following scenario:
system_vg active with only root_lv and tmpfs mounted.
our entries at fstab are like... (1 Reply)
Hello,
I have seen this syntax,
{ ;;};quite often and I don't know what it means exactly.
It seems like a distinctive thing of Bash, so it's been used for the logo of the last bug,
ShellShock: All you need to know about the Bash Bug vulnerability | Symantec Connect
I have also seen... (3 Replies)
Hello Gurus :)
I'm "currently" (for the last ~2weeks) writing a script to build ffmpeg with some features from scratch.
This said, there are quite a few features, libs, to be downloaded, compiled and installed, so figured, writing functions for some default tasks might help.
Specialy since... (3 Replies)
Hello! i try to understand the art of bash scripting but unfortunately, more i try and less i understand it.
Can someone tell me how i can learn its logic? i will give you an example why its making me crazy. Look at this basic script:
my for loops are working like this, but it took me more than... (10 Replies)
I am sharing a code snippet.
for (( i=0; i<=$(( $count -1 )); i++ ))
do
first=${barr2}
search=${barr1}
echo $first
echo "loop begins"
for (( j=0; j<=5000; j++ ))
do
if } == $search ]]; then
echo $j
break;
fi
done
second=${harr2}
echo $second (2 Replies)
Discussion started by: ngabrani
2 Replies
LEARN ABOUT OSF1
ffm
ffm(4) Kernel Interfaces Manual ffm(4)NAME
ffm - File-on-File Mounting File System
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
fattach(): XSH4.2
fdetach(): XSH4.2
Refer to standards(5) for more information about industry standards and their associated tags.
DESCRIPTION
The File-on-File Mounting (FFM) file system allows regular files, character device special files, or block device special files to be
mounted on regular files or directories.
The ffm file system is used with the System V Release 4-compatible library functions fattach(3) and detach(3) to enable a user process to
have one file descriptor pointing to the data associated with a named file and a named STREAM. When one name is active, the other name is
invisible.
For example, a user application mounts a file descriptor from a file named a_file on a file that is named b_file. The file descriptor of
file a_file is accessible by two names, a_file and b_file. However, when the user application attempts to open either file, only the file
descriptor for a_file is returned: the file descriptor for b_file is invisible while a_file is mounted over it.
The fattach(3) function mounts a file over another; the fdetach(3) function removes the association so the underlying file can be accessed.
The user process can also mount a regular file over a regular file in order for it to be a clone of the underlying file. [Do not confuse
this clone with an AdvFS clone fileset.] In this case, the clone file is a character device special file that is associated with a device
driver that handles such files. As a result, a user can specify one clone entry and then open this device multiple times. Each time the
device is opened, a new vnode is obtained but exactly the same device behavoir is also obtained: the behavior is cloned.
That mount occurs if the -o clone option is used in the mount command or as an element of a ffm line in the /etc/fstab file. In this case,
there are two files with identical contents, separate names, and separate file descriptors.
EXAMPLES
The following example shows an ffm mount of a_file on b_file. If the du command were executed, its display would show a_file in the file
system column and b_file in the Mounted on column:
# mount -t ffm a_file b_file
The following example shows an ffm mount of a_file on b_file, with the mount -o clone option specifying that a_file is a clone of b_file.
# mount -t ffm -o clone a_file b_file
RESTRICTIONS
The user process must be the root user or must be the owner of the files and must have write permissions for the files.
[Tru64 UNIX] Before you can use the ffm file system, you must configure the kernel option FFM_FS into the kernel. See System Administra-
tion for information about configuring the kernel.
RELATED INFORMATION
Commands: fdetach(8), mount(8)
Functions: fattach(3), fdetach(3), isastream(3), chmod(2), mount(2)
Interfaces: streamio(7)
Files: fstab(4)
Standards: standards(5) delim off
ffm(4)