Sponsored Content
Special Forums IP Networking How do I change my IP via terminal? Post 302747061 by RudiC on Thursday 20th of December 2012 01:03:11 PM
Old 12-20-2012
Internal IP ? use dhcp. External IP? Disconnect and reconnect, provider will give you a new IP.
 

10 More Discussions You Might Find Interesting

1. Solaris

Change Terminal Title

Is it possible to change the title of a Terminal window on Solaris? For example, for a MS Windows command window, one can simply type "title NameofWindow" to change the title for a command window. I was looking for similar functionality for terminal windows. Thanks. (8 Replies)
Discussion started by: here2learn
8 Replies

2. UNIX for Dummies Questions & Answers

How can I change the behavior of the mouse in Terminal?

Hi, I hope I'm posting in the correct forum, so here goes. I would like for the mouse right/left click to work in Terminal (OSX) as it does in Putty. For instance, when I double click 'log' in file.log.gz, only the log part is highlighted (in Terminal), while in Putty the entire file name is... (0 Replies)
Discussion started by: TheChemist
0 Replies

3. Solaris

How to change the system prompt and BG of terminal?

Hi all, I was wondering how to change the PS1 to my liking? I tried changing it using PS1='my choice' it worked but the subsequent terminals i open will not have it as the default PS1 ,how do i change it? also i am running as super user, and i need to exec bash, to get the bash environment...... (4 Replies)
Discussion started by: wrapster
4 Replies

4. Programming

terminal Width/height change

Hi, i am very new to unix/linux programming. for one of the application i have to change the Terminal width and height. i did try this if (ioctl (fd, TIOCGWINSZ, &win)) return; if (y && y >24) win.ws_row = y; else win.ws_row = 24; if (x && x>80)... (2 Replies)
Discussion started by: bgsunny
2 Replies

5. OS X (Apple)

Change Long User Name THrough The Terminal

Hello, I was wondering how to change a user's Long Name through the terminal. I am writing a shell script to change some settings back to the default, and could not find how to do this (or even if you can do this). I do not want to use applescript. (2 Replies)
Discussion started by: The Reepr
2 Replies

6. Solaris

How to change folder color in terminal ?

Hi all, I am really new to UNIX ..and can any1 help me on change the yellow color to blur color (folder) ? Please refer to the attached pictures .. Your help is really appreciated .. :) Have a nice day ! (5 Replies)
Discussion started by: sauronlord
5 Replies

7. Shell Programming and Scripting

Change color on another terminal

i already have a running and working script for remote connection. is there a way to change the terminal color everytime I ssh remotely to another server? this is to avoid confusion since I will be using only one server to remotely access around 50 servers (solaris, linux,. etc) (2 Replies)
Discussion started by: lhareigh890
2 Replies

8. Shell Programming and Scripting

How to change the title bar of the terminal screen

Hi, How to change the value after the symbol '@' ? $ i.e. @mac1 I want to change it to @prod2 Also need to change the same in the title bar on the top when we open a new terminal. (3 Replies)
Discussion started by: milink
3 Replies

9. UNIX for Dummies Questions & Answers

Change default terminal compiler - Centos

I'm working on a centos 5.10 64bit desktop machine. I want to change the default terminal compiler to bash instead of csh/sh without root permissions. Thanks in advance (4 Replies)
Discussion started by: aelhosiny
4 Replies

10. UNIX for Dummies Questions & Answers

How to change colours in Linux Terminal Xfce?

Hi all - just started using Linux Mint 17 and I need to change the Foreground & Background Colours for the Terminal, my eyesight is not what it used to be many years ago, so any help would be much appreciated. Regards Malcolm (6 Replies)
Discussion started by: electrocad
6 Replies
G_ACCESS(9)						   BSD Kernel Developer's Manual					       G_ACCESS(9)

NAME
g_access -- control access to GEOM consumers and their providers SYNOPSIS
#include <geom/geom.h> int g_access(struct g_consumer *cp, int dcr, int dcw, int dce); DESCRIPTION
The g_access() function allows to open, close, and generally change access to the provider which is attached to the given consumer cp. The arguments dcr, dcw, and dce represent relative read, write, and exclusive access count changes. Read and write access counts are self explanatory, and exclusive access counts deny write access to other interested parties. A provider's access count is the sum of the access counts of all attached consumers. After attaching a consumer to a provider with g_attach(9), the g_access() function has to be called on the consumer before starting I/O requests. RESTRICTIONS
/CONDITIONS The consumer has to be attached to a provider. The intended change must not result in a negative access count. No-operation is not permitted (dcr = dcw = dce = 0). The provider's geom must have an access method defined (e.g., gp->access). The topology lock has to be held. RETURN VALUES
The g_access() function returns 0 if successful; otherwise an error code is returned. Note that g_access() cannot fail when the arguments dcr, dcw, and dce are less than or equal to 0. EXAMPLES
Create a consumer, attach it to a given provider, gain read access and read first sector. void some_function(struct g_geom *mygeom, struct g_provider *pp) { struct g_consumer *cp; void *ptr; int error; g_topology_assert(); /* Create new consumer on 'mygeom' geom. */ cp = g_new_consumer(mygeom); /* Attach newly created consumer to given provider. */ if (g_attach(cp, pp) != 0) { g_destroy_consumer(cp); return; } /* Open provider for reading through our consumer. */ error = g_access(cp, 1, 0, 0); if (error != 0) { printf("Cannot access provider: %s ", error); g_detach(cp); g_destroy_consumer(cp); return; } /* * Don't hold topology lock while reading. */ g_topology_unlock(); ptr = g_read_data(cp, 0, pp->sectorsize, &error); if (ptr == NULL) printf("Error while reading: %d ", error); /* * Do something useful with data. */ g_topology_lock(); /* Disconnect from provider (release access count). */ g_access(cp, -1, 0, 0); /* Detach from provider. */ g_detach(cp); /* Destroy consumer. */ g_destroy_consumer(cp); } ERRORS
Possible errors: [EPERM] The function is trying to open a provider with an exclusive access count, but it is already open for writing. [EPERM] The function is trying to open a provider for writing, but it is already exclusively open. Any other error that can be returned by the provider's access method. SEE ALSO
geom(4), DECLARE_GEOM_CLASS(9), g_attach(9), g_bio(9), g_consumer(9), g_data(9), g_event(9), g_geom(9), g_provider(9), g_provider_by_name(9), g_wither_geom(9) AUTHORS
This manual page was written by Pawel Jakub Dawidek <pjd@FreeBSD.org>. BSD
January 16, 2004 BSD
All times are GMT -4. The time now is 10:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy