Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Hi
When trying to find and delete files which are, say, 1 day, the find command misses a day. Please refer the following example.
xxxd$ find . -type f -ctime +1 -exec ls -ltr {} \;
total 64
-rw-rw-r-- 1 oracle xxxd 81 Apr 30 11:25 ./ful_cfg_tmp_20080429_7.dat
-rw-rw-r-- 1... (4 Replies)
Hi
I have a script to find and delete the files which are say, noDaysOld, I am interested to find the number of such files I am fniding for deleting and then deleting it.
So, the script I wrote, first finds the number of such files and then deletes, clearly this is two different steps.
... (3 Replies)
Hi,
I have research data, which is organized to 100 folders numbered 00-99. I have many sets of 100 folders, for different values of initial parameters. For some reason, the computer that ran the program to gather the data, didn't always create a unique seed for each folder. I anticipated that... (1 Reply)
I have a small script where I want to see if a file exists & then delete the first line from it.
I have code to help me find if the file exists, but I am unsure as to how to then take in the answer and remove the first line from the flatfile:
This is what I have so far just to output if the... (3 Replies)
HI All, I need to search for a particular pattern input by the user in order to delete the line. My username.txt has
username@email.com:John:149.0.3.4:1
username1@email.com:Harry:149.0.3.4:1
username1@email.net:Alex:149.0.3.4:1
username1@email.edu:Nemo:149.0.3.4:1
The program i written
... (3 Replies)
Hi Friends,
I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Hi All,
I have a file with the data:
Sun is Hot
Moon is cool
;
-- Mon Sep 10 08:54:10 CDT 2012
-- Mon Sep 11 08:54:10 CDT 2012
-- Mon Sep 12 08:54:10 CDT 2012
revoke connect from SREE;
delete from = 'SREE';
grant connect to SREE with 'fastcar8';
I want to remove the line above... (8 Replies)
#!/bin/bash
#
name=$1
type=$2
number=1
for file in ./**
do
if
then
filenumber=00$number
elif
then
filenumber=0$number
fi
tempname="$name""$filenumber"."$type"
if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies
LEARN ABOUT BSD
badsect
BADSECT(8) System Manager's Manual BADSECT(8)NAME
badsect - create files to contain bad sectors
SYNOPSIS
/sbin/badsect sector ...
DESCRIPTION
Badsect makes a file to contain a bad sector. Normally, bad sectors are made inaccessible by the standard formatter, which provides a for-
warding table for bad sectors to the driver; see bad144(8) for details. If a driver supports the bad blocking standard it is much prefer-
able to use that method to isolate bad blocks, since the bad block forwarding makes the pack appear perfect, and such packs can then be
copied with dd(1). The technique used by this program is also less general than bad block forwarding, as badsect can't make amends for bad
blocks in the i-list of file systems or in swap areas.
Adding a sector which is suddenly bad to the bad sector table currently requires the running of the standard DEC formatter, as UNIX does
not supply formatters. Thus to deal with a newly bad block or on disks where the drivers do not support the bad-blocking standard badsect
may be used to good effect.
Badsect is used on a quiet file system in the following way: First mount the file system, and change to its root directory. Make a direc-
tory BAD there and change into it. Run badsect giving as argument all the bad sectors you wish to add. (The sector numbers should be
given as physical disk sectors relative to the beginning of the file system, exactly as the system reports the sector numbers in its con-
sole error messages.) Then change back to the root directory, unmount the file system and run fsck(8) on the file system. The bad sectors
should show up in two files or in the bad sector files and the free list. Have fsck remove files containing the offending bad sectors, but
do not have it remove the BAD/nnnnn files. This will leave the bad sectors in only the BAD files.
Badsect works by giving the specified sector numbers in a mknod(2) system call (after taking into account the filesystem's block size),
creating a regular file whose first block address is the block containing bad sector and whose name is the bad sector number. The file has
0 length, but the check programs will still consider it to contain the block containing the sector. This has the pleasant effect that the
sector is completely inaccessible to the containing file system since it is not available by accessing the file.
SEE ALSO mknod(2), bad144(8), fsck(8)BUGS
If both sectors which comprise a (1024 byte) disk block are bad, you should specify only one of them to badsect, as the blocks in the bad
sector files actually cover both (bad) disk sectors.
On the PDP-11, only sector number less than 131072 may be specified on 1024-byte block filesystems, 65536 on 512-byte block filesystems.
This is because only a short int is passed to the system from mknod.
3rd Berkeley DistributionBADSECT(8)