Find out if multiple files have lines ending with"r"
I am trying to find out which files in a group of files have lines ending in r. What I have is this:
Records is more than one file. There are the following files
I was trying to use this command to find out which Records had "r" but of course it returns yes when run because if even one file has a volume ending in R it would return "yes."
If I do this:
Then I get a load of messages "no such file or directory" and the names of the files.
I am really just trying to find out which of these files has a line ending in r, and then print yes for just that file, but I am stuck.
Hi all,
In unix shell, I want to get two strings ending with "." and starting with "." from a string "chan.txt"
For example, a string "chan.txt".
The first string is "chan"
The second string is "txt"
Yours
Wilson (1 Reply)
I could really use some help with this issue. I'm having a lot of trouble getting my sed command to delete only the lines from my file that end with _;
I'm also supposed to carry the leading 'c' down to the next line. The commands I've tried either delete everything or nothing at all. Any help... (12 Replies)
Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
I am trying to extract multiple strings from snmp-mib files like below.
-----
$ cat IF-MIB.mib
<snip>
linkDown NOTIFICATION-TYPE
OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
STATUS current
DESCRIPTION
"A linkDown trap signifies that the SNMP entity, acting in... (5 Replies)
I have a group of files that I need to be sorted by number. I have tried to use the sort command without any luck.
ls includes*
includes1
includes10
includes11
includes12
includes2
includes3
includes4
includes5
includes6
includes7
includes8
includes9
I have tried ls includes*... (6 Replies)
Hi All,
I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd.
What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Hello all!
I'm pretty new to bash scripting, so this should be a pretty easy question to solve.
For the last few hours, I've been creating a script that will list some of the following (based on a path I specify):
# of directories
# of files
# of executable files
files older than 365... (2 Replies)
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
I am trying find files in sub dir with certain tags using tag command, and add the period to the beginning. I can't use chflags hidden {} cause it doesn't add period to the beginning of the string for web purpose. So far with my knowledge, I only know mdfind or tag can be used to search files with... (6 Replies)
Discussion started by: Nexeu
6 Replies
LEARN ABOUT REDHAT
vgremove
VGREMOVE(8) System Manager's Manual VGREMOVE(8)NAME
vgremove - remove a volume group
SYNOPSIS
vgremove [-d|--debug] [-h|--help] [-v|--verbose] VolumeGroupName [VolumeGroupName...]
DESCRIPTION
vgremove allows you to remove one or more volume groups. The volume group(s) must not have any logical volumes allocated and must also be
inactive (see vgchange(8) ).
OPTIONS
-d, --debug
Enables additional debugging output (if compiled with DEBUG).
-h, --help
Print a usage message on standard output and exit successfully.
-v, --verbose
Gives verbose runtime information about vgremove's activities.
DIAGNOSTICS
vgremove returns an code code of 0 for success and > 0 for error:
1 no volume group name on command line
2 error setting up freed physical volume
3 error writing freed physical volume(s) to disk(s)
4 error removing volume group from lvmtab
5 can't remove volume group containing logical volumes
6 invalid volume group name
7 volume group is active
8 not all physical volumes are online
9 error accessing volume group
10 error reading volume group data from disk(s)
95 driver/module not in kernel
96 invalid I/O protocol version
97 error locking logical volume manager
98 invalid lvmtab (run vgscan(8))
99 invalid command line
See alsolvm(8), vgcreate(8), vgreduce(8)AUTHOR
Heinz Mauelshagen <Linux-LVM@Sistina.com>
Heinz Mauelshagen LVM TOOLS VGREMOVE(8)