Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Insert line break in vi's command mode Post 302125691 by Skogsmulle on Friday 6th of July 2007 10:47:47 AM
Old 07-06-2007
Thank you for your swift replies. I think I'll go and define myself a keymap then Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Insert line break

Dear All, thanks in advance input file 410530AAANNNNNAAA410530JJJJJJYYYY410530PPPPPAAAAAA........... I want output like 410530AAANNNNNAAA 410530JJJJJJYYYY 410530PPPPPAAAAAA Thanks (10 Replies)
Discussion started by: The_Archer
10 Replies

3. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

4. UNIX for Advanced & Expert Users

What is the difference between single line mode and multiline mode in Regular expressions?

Hi All, Can please let me know what is the difference between the single line mode and multi line mode in regular expresions? Thanks, Chidhambaram B (3 Replies)
Discussion started by: chidhu.anu
3 Replies

5. UNIX for Dummies Questions & Answers

Insert a break page after certain string using SED

Hi: I have 2 files: teststring.txt and a tempfile.txt teststring file contains: s/Primary Ins./\n1/g I'm trying to search for "Primary Ins." string in tempfile. For every "Primary Ins." string that is found, a new line is inserted and put in number 1. Then, write out the newfile... (7 Replies)
Discussion started by: newbeee
7 Replies

6. Shell Programming and Scripting

Insert shell command into first line of output file

How can I insert the command executed on the shell into the first line of my output file? For example if I execute; zcat *.gz |grep “User5501” > users.out How can I make my users.out look like; zcat *.gz |grep “User5501” > users.out User5501 PA User5501 UA User5501 ZA... (3 Replies)
Discussion started by: lewk
3 Replies

7. Shell Programming and Scripting

one line command to change mode only if necessary

hi, sorry for posting this for a quick answer. Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode? Running chmod updates the last access/modified timestamp on the files, and i want to... (11 Replies)
Discussion started by: ysrini
11 Replies

8. Red Hat

How to start Fedora 11 in command line mode and skip damaged programs ??

Hi All, Please let me know that how to start Fedora 11 in command line mode and skip damaged programs ?? Scenario being: I have Fedora 11 ( pretty ole... eh !! ). If I try to start the PC , then after some steps of startup... it just hangs and does not boots. I tried entering the mode... (4 Replies)
Discussion started by: dipanchandra
4 Replies

9. UNIX for Dummies Questions & Answers

sed command to Insert a line before the last four lines of the file

By using sed command, How to insert a new line before the last four lines of the file. Old Line Old Line NEW LINE! Old Line Old Line Old Line Old Line (8 Replies)
Discussion started by: wridler
8 Replies

10. UNIX for Beginners Questions & Answers

Shell vim defaulting to Insert or Command mode

On a daily basis I need to SSH into several different RHEL servers using Putty. On some of the servers, if I up arrow to get a previous command, it automatically starts in Input Mode, so if I press up arrow, then 'x' it will type the letter x at the end of the command line. On other servers, it... (4 Replies)
Discussion started by: derndingle
4 Replies
swift-ring-builder(8)					      System Manager's Manual					     swift-ring-builder(8)

NAME
swift-ring-builder - Manipulate the swift ring storage devices. SYNOPSIS
swift-ring-builder <builder_file> [ACTION] [parameters] DESCRIPTION
swift-ring-builder Manipulate the swift ring. Please contribute a better long description! PARAMETERS
The parameter [ACTION] can take one of the following values: create search add set_weight set_info remove rebalance validate write_ring set_min_part_hours If action is not specified, then swift-ring-builder will display all the storage devices. Below is a full description of each individual actions. In each individual action, you may specify a <search-value>. In that case, then <search-value> can be of the form: d<device_id>z<zone>-<ip>:<port>/<device_name>_<meta> Any part is optional, but you must include at least one part. Examples: d74 Matches the device id 74 z1 Matches devices in zone 1 z1-1.2.3.4 Matches devices in zone 1 with the ip 1.2.3.4 1.2.3.4 Matches devices in any zone with the ip 1.2.3.4 z1:5678 Matches devices in zone 1 using port 5678 :5678 Matches devices that use port 5678 /sdb1 Matches devices with the device name sdb1 _shiny Matches devices with shiny in the meta data _"snet: 5.6.7.8" Matches devices with snet: 5.6.7.8 in the meta data Most specific example: d74z1-1.2.3.4:5678/sdb1_"snet: 5.6.7.8" Nerd explanation: All items require their single character prefix except the ip, in which case the - is optional unless the device id or zone is also included. CREATE
swift-ring-builder <builder_file> create <part_power> <replicas> <min_part_hours> Creates <builder_file> with 2^<part_power> partitions and <replicas>. <min_part_hours> is number of hours to restrict moving a partition more than once. SHOW
swift-ring-builder <builder_file> Shows information about the ring and the devices within. SEARCH
swift-ring-builder <builder_file> search <search-value> Shows information about matching devices. ADD
swift-ring-builder <builder_file> add z<zone>-<ip>:<port>/<device_name>_<meta> <weight> Adds a device to the ring with the given information. No partitions will be assigned to the new device until after running 'rebalance'. This is so you can make multiple device changes and rebalance them all just once. SET WEIGHT
swift-ring-builder <builder_file> set_weight <search-value> <weight> Resets the device's weight. No partitions will be reassigned to or from the device until after running 'rebalance'. This is so you can make multiple device changes and rebalance them all just once. SET INFO
swift-ring-builder <builder_file> set_info <search-value> <ip>:<port>/<device_name>_<meta> Resets the device's information. This information isn't used to assign partitions, so you can use 'write_ring' afterward to rewrite the current ring with the newer device information. Any of the parts are optional in the final <ip>:<port>/<device_name>_<meta> parameter; just give what you want to change. For instance set_info d74 _"snet: 5.6.7.8" would just update the meta data for device id 74. REMOVE
swift-ring-builder <builder_file> remove <search-value> Removes the device(s) from the ring. This should normally just be used for a device that has failed. For a device you wish to decommission, it's best to set its weight to 0, wait for it to drain all its data, then use this remove command. This will not take effect until after running 'rebalance'. This is so you can make multiple device changes and rebalance them all just once. REBALANCE
swift-ring-builder <builder_file> rebalance Attempts to rebalance the ring by reassigning partitions that haven't been recently reassigned. VALIDATE
swift-ring-builder <builder_file> validate Just runs the validation routines on the ring. WRITE RING
swift-ring-builder <builder_file> write_ring Just rewrites the distributable ring file. This is done automatically after a successful rebalance, so really this is only useful after one or more set_info calls when no rebalance is needed but you want to send out the new device information. SET MIN PART HOURS
swift-ring-builder <builder_file> set_min_part_hours <hours> Changes the <min_part_hours> to the given <hours>. This should be set to however long a full replication/update cycle takes. We're working on a way to determine this more easily than scanning logs. swift-ring-builder(8)
All times are GMT -4. The time now is 01:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy