9 More Discussions You Might Find Interesting
1. AIX
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
2. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
3. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies
6. Shell Programming and Scripting
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies
7. UNIX for Advanced & Expert Users
I'm using wget 1.11.4 on Cygwin 1.5.25.
I'm trying to recursively download a directory tree, which is the root of a javadoc tree.
This is approximately the command line I tried:
wget -x -p -r http://<host>/.../apidoc
When it finished, it seemed like it downloaded... (0 Replies)
Discussion started by: dkarr
0 Replies
8. Shell Programming and Scripting
I tried to copy data from one location to multiple location my typing...
cp <source> <dest> <dest>
however this will omits one of the destination ... and proceed to copy to only one directory (2 Replies)
Discussion started by: dplate07
2 Replies
9. UNIX for Advanced & Expert Users
Hi,
I was trying to call "script <an ip add>" command from .profile file to log everything whenever anyone logs in to this user. I did the following at the end of .profile. 1) Extracted the IP address who logged in 2) Called script < ip add> . The problem I am facing is all, aliases etc. written... (3 Replies)
Discussion started by: amicon007
3 Replies
FSCK_EXT2FS(8) BSD System Manager's Manual FSCK_EXT2FS(8)
NAME
fsck_ext2fs -- ext2 File System consistency check and interactive repair
SYNOPSIS
fsck_ext2fs [-dfnpUy] [-b block#] [-c level] [-m mode] filesystem ...
DESCRIPTION
fsck_ext2fs performs interactive filesystem consistency checks and repair for each of the filesystems specified on the command line. It is
normally invoked from fsck(8).
The kernel takes care that only a restricted class of innocuous filesystem inconsistencies can happen unless hardware or software failures
intervene. These are limited to the following:
Unreferenced inodes
Link counts in inodes too large
Missing blocks in the free map
Blocks in the free map also in files
Counts in the super-block wrong
These are the only inconsistencies that fsck_ext2fs in ``preen'' mode (with the -p option) will correct; if it encounters other inconsisten-
cies, it exits with an abnormal return status. For each corrected inconsistency one or more lines will be printed identifying the filesystem
on which the correction will take place, and the nature of the correction. After successfully correcting a filesystem, fsck_ext2fs will
print the number of files on that filesystem and the number of used and free blocks.
If sent a QUIT signal, fsck_ext2fs will finish the filesystem checks, then exit with an abnormal return status.
Without the -p option, fsck_ext2fs audits and interactively repairs inconsistent conditions for filesystems. If the filesystem is inconsis-
tent the operator is prompted for concurrence before each correction is attempted. It should be noted that some of the corrective actions
which are not correctable under the -p option will result in some loss of data. The amount and severity of data lost may be determined from
the diagnostic output. The default action for each consistency correction is to wait for the operator to respond yes or no. If the operator
does not have write permission on the filesystem fsck_ext2fs will default to a -n action.
The following flags are interpreted by fsck_ext2fs.
-b Use the block specified immediately after the flag as the super block for the filesystem. Block 8193 is usually an alternate super
block.
-d Print debugging output.
-f Force checking of file systems. Normally, if a file system is cleanly unmounted, the kernel will set a ``clean flag'' in the file
system superblock, and fsck_ext2fs will not check the file system. This option forces fsck_ext2fs to check the file system, regard-
less of the state of the clean flag.
-m Use the mode specified in octal immediately after the flag as the permission bits to use when creating the lost+found directory
rather than the default 1777. In particular, systems that do not wish to have lost files accessible by all users on the system
should use a more restrictive set of permissions such as 700.
-n Assume a no response to all questions asked by fsck_ext2fs except for 'CONTINUE?', which is assumed to be affirmative; do not open
the filesystem for writing.
-p Specify ``preen'' mode, described above.
-U Resolve numeric userids to usernames.
-y Assume a yes response to all questions asked by fsck_ext2fs; this should be used with great caution as this is a free license to con-
tinue after essentially unlimited trouble has been encountered.
Inconsistencies checked are as follows:
1. Blocks claimed by more than one inode or the free map.
2. Blocks claimed by an inode outside the range of the filesystem.
3. Incorrect link counts.
4. Size checks:
Directory size not a multiple of filesystem block size.
Partially truncated file.
5. Bad inode format.
6. Blocks not accounted for anywhere.
7. Directory checks:
File pointing to unallocated inode.
Inode number out of range.
Dot or dot-dot not the first two entries of a directory or having the wrong inode number.
8. Super Block checks:
More blocks for inodes than there are in the filesystem.
Bad free block map format.
Total free block and/or free inode count incorrect.
Orphaned files and directories (allocated but unreferenced) are, with the operator's concurrence, reconnected by placing them in the
lost+found directory. The name assigned is the inode number. If the lost+found directory does not exist, it is created. If there is insuf-
ficient space its size is increased.
Because of inconsistencies between the block device and the buffer cache, the raw device should always be used.
DIAGNOSTICS
The diagnostics produced by fsck_ext2fs are fully enumerated and explained in Appendix A of Fsck - The UNIX File System Check Program.
SEE ALSO
fs(5), fstab(5), fsck(8), fsdb(8), newfs(8), reboot(8)
BSD
October 9, 2008 BSD