Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › How do I format this command (ubuntu)
New Posts  All Forums:Forum Nav:

How do I format this command (ubuntu) - Page 2

post #11 of 16
Quote:
Originally Posted by Crazy9000 View Post

I'm afraid to edit myself in case I typo and ruin everything xD
Thanks, the sudo su seemed to let me run the command.
Quote:
Originally Posted by mushroomboy View Post

gksu gedit, graphically edit that SOB and put it in it's place!
I hate editing files in CLI and avoid it any chance I can get. i also tend to edit multiple files at the same time, so I like having tabs in case I have to re-edit files on the fly.

You can have multiple tabs (though it's rendered differently) in CLI editors too. Even vi supports that.

Each have their place (cli and gui), but If you get into any kind of serious / professional *nix systems administration than it will be unlikely that you'd even have xwindows installed on your servers. So if you're looking to make a career of Linux then it's not necessarily a bad idea to get to grips with vi. Though I can't blame you for preferring gedit over the terminal.
post #12 of 16
Quote:
Originally Posted by Plan9 View Post

You can have multiple tabs (though it's rendered differently) in CLI editors too. Even vi supports that.
Each have their place (cli and gui), but If you get into any kind of serious / professional *nix systems administration than it will be unlikely that you'd even have xwindows installed on your servers. So if you're looking to make a career of Linux then it's not necessarily a bad idea to get to grips with vi. Though I can't blame you for preferring gedit over the terminal.

VIM is really nice for my bash scripting at work, and reading anything that has coding to it.
post #13 of 16
I've come to love anything that's Vi/Vim and uses their commands. After you learn them it really is absolutely amazing.
post #14 of 16
Quote:
Originally Posted by herkalurk View Post

VIM is really nice for my bash scripting at work, and reading anything that has coding to it.
Quote:
Originally Posted by Shrak View Post

I've come to love anything that's Vi/Vim and uses their commands. After you learn them it really is absolutely amazing.

Couldn't agree with you more.

Though I will say, one of the most infuriating things ever is typoing a vi command and noticing it's done some weird stuff to your code laugher.gif
post #15 of 16
the proper way to do that is
Code:
echo "/usr/local/lib/dbd" | sudo tee  /etc/ld.so.conf.d/eg.conf
echo "/usr/local/lib/dbd" | sudo tee -a  /etc/ld.so.conf.d/eg.conf     # add -a to append to an existing file (>>) , very important, vs no -a  (>)

The best practice usually is to not set a password for root, and do not use the su command. sudo -u [user] -s should be used over su. to omit the -u implies uid=0.

tee is a pretty cool command ... i don't have the scripts here but in the past I had done a few wild things with it and the 3 file descriptor thumb.gif very interesting stuff. >&3


don't forget you can also use sed -i in lieu of an editor ... for automated install scripts this is important to learn. sed and awk will see pretty frequent use once you know them, great tools
Edited by lloyd mcclendon - 3/23/12 at 2:03pm
stable again
(25 items)
 
  
CPUCPUMotherboardGraphics
E5-2687W E5-2687W ASUS Z9PED8-WS EVGA GTX 570 (Linux host) 
GraphicsRAMHard DriveHard Drive
EVGA GTX 970 FTW (win7 guest) 64GB G.SKILL 2133 2x Crucial M4 256GB raid1 4x 3TB raid 10 
CoolingCoolingCoolingCooling
2x Apogee HD  2x RX 480 2x MCP 655 RP-452x2 rev2 (new) 
CoolingCoolingOSOS
16x Cougar Turbine CFT12SB4 (new) EK FC 580 Gentoo (host) Gentoo (x23 guests) 
OSMonitorMonitorPower
windows 7 (guest w/ vfio-pci) Viewsonic 23" 1080P Viewsonic 19" Antec HCP Platinum 1000 (new) 
CaseOtherOther
Case Labs TH10 (still the best ever) 2x Lamptron FC-5 IOGEAR 2 way DVI KVM Switch 
  hide details  
Reply
stable again
(25 items)
 
  
CPUCPUMotherboardGraphics
E5-2687W E5-2687W ASUS Z9PED8-WS EVGA GTX 570 (Linux host) 
GraphicsRAMHard DriveHard Drive
EVGA GTX 970 FTW (win7 guest) 64GB G.SKILL 2133 2x Crucial M4 256GB raid1 4x 3TB raid 10 
CoolingCoolingCoolingCooling
2x Apogee HD  2x RX 480 2x MCP 655 RP-452x2 rev2 (new) 
CoolingCoolingOSOS
16x Cougar Turbine CFT12SB4 (new) EK FC 580 Gentoo (host) Gentoo (x23 guests) 
OSMonitorMonitorPower
windows 7 (guest w/ vfio-pci) Viewsonic 23" 1080P Viewsonic 19" Antec HCP Platinum 1000 (new) 
CaseOtherOther
Case Labs TH10 (still the best ever) 2x Lamptron FC-5 IOGEAR 2 way DVI KVM Switch 
  hide details  
Reply
post #16 of 16
Quote:
Originally Posted by lloyd mcclendon View Post

don't forget you can also use sed -i in lieu of an editor ... for automated install scripts this is important to learn. sed and awk will see pretty frequent use once you know them, great tools

I had to do some quirky stuff to get around visudo, i hadn't thought of using sed as editor. Thanks for the tip (repped)
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › How do I format this command (ubuntu)