Search Results

Search found 43847 results on 1754 pages for 'command line arguments'.

Page 6/1754 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Connecting to wireless networks from command line

    - by Balaji
    I need to write a shell script which connects to one of the two available wi-fi connections. One is a un secure connection and the other is secure connection. My question has 2 parts- 1.How to connect to the un-secure (un-encrypted and no password required) connection from command line (or by executing a shell script) when I'm connected to the secure connection? I followed the steps in http://www.ubuntugeek.com/how-to-troubleshoot-wireless-network-connection-in-ubuntu.html for in-secure connection. I put all the commands in a script and executed it (I made sure that interface name and essid are correct) - sudo dhclient -r wlan0 - sudo ifconfig wlan0 up - sudo iwconfig wlan0 essid "UAPublic" - sudo iwconfig wlan0 mode Managed - sudo dhclient wlan0 But nothing happens - I'm not disconnected from the current network and connected to the new one 2.When I want to connect to the secure wi-fi network, I understand from http://askubuntu.com/a/138476/70665 that I need to use wpa_supplicant. But I enter a lot of details in the interface when I connect via UI security : wpa and wpa2 enterprise Authentication : PEAP CA certificate : Equifax... PEAP version : automatic inner authentication : MSCHAPv2 username : password : How to use wpa_supplicant to mention all these details in the command line? The conf file network={ ssid="ssid_name" psk="password" } doesn't work for me.

    Read the article

  • What's the equivalent of the "cls" command from Windows/DOS?

    - by blade19899
    I used to use cmd back in windows and the command line a used a lot was cls. It's kind of like the clear command in Linux but it cleans the screen permanently. If you use the clear command it just scroll down so that you don't see the command you where working on. I like both a lot but my question is how do i get a cls like command that clears the screen and can't browse up to see the command you where working on?

    Read the article

  • using ubuntu command line to replace text in huge file

    - by user299331
    hi i have a huge xml file that i must work with. right now the file is only 1 line that contains about 2 million characters which represent 30,000 records. there are no carriage returns or linefeeds whatsoever. what i need to do is make each record on its own line. new records begin with "" and end with "". i've been looking around here and it seems the tools to use are: sed, tr or awk but i'm not sure which is most appropriate. i've tried this to no avail: tr '<ROW' '\012 <ROW' <source.xml |tee destination.xml above seems to output some pretty weird stuff so i must be way off here. maybe its that "<" character that is the problem?

    Read the article

  • C# Adds Optional and Named Arguments

    Earlier this month Microsoft released Visual Studio 2010, the .NET Framework 4.0 (which includes ASP.NET 4.0), and new versions of their core programming languages: C# 4.0 and Visual Basic 10. In designing the latest versions of C# and VB, Microsoft has worked to bring the two languages into closer parity. Certain features available in C# were missing in VB, and vice-a-versa. Last week I wrote about Visual Basic 2010's language enhancements, which include implicit line continuation, auto-implemented properties, and collection initializers - three useful features that were available in previous versions of C#. Similarly, C# 4.0 introduces new features to the C# programming language that were available in earlier versions of Visual Basic, namely optional arguments and named arguments. Optional arguments allow developers to specify default values for one or more arguments to a method. When calling such a method, these optional arguments may be omitted, in which case their default value is used. In a nutshell, optional arguments allow for a more terse syntax for method overloading. Named arguments, on the other hand, improve readability by allowing developers to indicate the name of an argument (along with its value) when calling a method. This article examines how to use optional arguments and named arguments in C# 4.0. Read on to learn more! Read More >

    Read the article

  • C# Adds Optional and Named Arguments

    Earlier this month Microsoft released Visual Studio 2010, the .NET Framework 4.0 (which includes ASP.NET 4.0), and new versions of their core programming languages: C# 4.0 and Visual Basic 10. In designing the latest versions of C# and VB, Microsoft has worked to bring the two languages into closer parity. Certain features available in C# were missing in VB, and vice-a-versa. Last week I wrote about Visual Basic 2010's language enhancements, which include implicit line continuation, auto-implemented properties, and collection initializers - three useful features that were available in previous versions of C#. Similarly, C# 4.0 introduces new features to the C# programming language that were available in earlier versions of Visual Basic, namely optional arguments and named arguments. Optional arguments allow developers to specify default values for one or more arguments to a method. When calling such a method, these optional arguments may be omitted, in which case their default value is used. In a nutshell, optional arguments allow for a more terse syntax for method overloading. Named arguments, on the other hand, improve readability by allowing developers to indicate the name of an argument (along with its value) when calling a method. This article examines how to use optional arguments and named arguments in C# 4.0. Read on to learn more! Read More >Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • can not run java program from command line which resides in package

    - by kshitij
    See following code with resides in fillowing directory mypack.pack1 package mypack.pack1; public class myclass { public static void main(String args[]) { System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"); } } See following screen shot. that is giving error. And i dont want to add anything in class path because i am in particular directory and it has to work. why it is not working.??????

    Read the article

  • How to Print or Save a Directory Listing to a File

    - by Lori Kaufman
    Printing a directory listing is something you may not do often, but when you need to print a listing of a directory with a lot of files in it, you would rather not manually type the filenames. You may want to print a directory listing of your videos, music, ebooks, or other media. Or, someone at work may ask you for a list of test case files you have created for the software you’re developing, or a list of chapter files for the user guide, etc. If the list of files is small, writing it down or manually typing it out is not a problem. However, if you have a lot of files, automatically creating a directory listing would get the task done quickly and easily. This article shows you how to write a directory listing to a file using the command line and how to use a free tool to print or save a directory listing in Windows Explorer. Amazon’s New Kindle Fire Tablet: the How-To Geek Review HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS Use Your Android Phone to Comparison Shop: 4 Scanner Apps Reviewed

    Read the article

  • Unable to assign command output to a variable

    - by Harish Maralihalli
    I am trying to assign the latest file name obtained from the below ls command but getting some error, it would be very nice if someone can answer how can I fix this! fn=`ls -lrt pur_bom_interface_daily*.log | cut -c59-102 | tail -1` or fn=$(ls -lrt pur_bom_interface_daily*.log | cut -c59-102 | tail -1) Error got: ls: 0653-341 The file pur_bom_interface_daily*.log does not exist Note: pur_bom_interface_daily*.log I am using * since there are multiple files starting their name with pur_bom_interface_daily and concatanated with the date on which they have got created.

    Read the article

  • bash command for each file in a folder

    - by Robert
    I have a set of files on which I would like to apply the same command and the output should contain the same name as the processed file but with a different extension. Currently I am doing rename /my/data/Andrew.doc to /my/data/Andrew.txt I would like to do this for all the .doc files from the /my/data/ folder and to preserve the name. I tried several versions but I guess I have something wrong in the syntax as I an new to linux.

    Read the article

  • Custom keyboard shortcut to lauch a terminal and run a command in Unity

    - by David Weinraub
    I know this should be the simplest thing, but coming up empty. ;-( I would like to create a keyboard shortcut ctrl-alt-P that opens a terminal window and runs a ping command: ping -c 4 somefixeddomain.com [Useful for quickly checking whether my internet connection is actually working.] I have attempted to do this (in Unity, Ubuntu v11.10) using: Settings > Keyboard > Custom Shortcuts filling in all the obvious stuff, but no luck. All ideas welcome.

    Read the article

  • Bash command history not working

    - by user12663
    The command history between sessions is not getting saved. I'm using guake and the history for the session is working fine. I noticed that .bash_history had some commands I executed in sudo -s mode and tried the same again and all the commands while in the session got saved so I tried chmod 777 .bash_history Now the old commands appear at the start of a session but no new commands are getting saved Thanx in advance

    Read the article

  • Logging every time a command is run

    - by Tom D
    I want to log every time I run a certain type of command in the terminal. For example, every time I run: sudo apt-get install [something] I want to add [something] to a log file in my home directory that will look like the following: [timestamp] [something] 2012-10-02 mysql-server 2012-10-03 ruby1.9.1 2012-10-06 gedit-plugins 2012-10-07 gnome-panel synaptic What's the easiest way to make this happen automatically?

    Read the article

  • Launching php script through comman line - keeping terminal window open after execution

    - by somethis
    Oh, my girlfriend really likes it when I launch php scripts! There's something special about them, she says ... Thus, I coded this script to run throught the CLI (Command Line Interface) - so it's running locally, not on a web server. It launches just fine through right click open run in terminal but closes right after execution. **Is there a way to keep the terminal window open? Of course I can launch it through a terminal window - which would stay open - but I'm looking for a one click action. With bash scripts I use $SHELL but that didn't work (see code below). So far, the only thing I came up with is sleep(10); which gives me 10 seconds for my girl to check the output. I'd rather close the terminal window manually, though. #!/usr/bin/php -q <?php echo "Hello World \n"; # wait before closing terminal window sleep(10); # the following line doesn't work $SHELL; ?> (PHP 5.4.6-1ubuntu1.2 (cli) (built: Mar 11 2013 14:57:54) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies )

    Read the article

  • new line in a multi-line string

    - by Zka
    Trying to override a tostring in one of my classes. return string.Format(@" name = {0} ID = {1} sec nr = {2} acc nr = {3}", string, int, int ,int); // types But the thing is, the result isn't aligned when printed out: name = test ID = 42 sec nr = 11 acc nr = 55 Trying to add \n just prints it out without formating. Guessing it has something to do with @"" which I'm using for multi-lining. Would like it to print out : name = test ID = 42 sec nr = 11 acc nr = 55

    Read the article

  • Awk command to print all the lines except the last three lines

    - by Avinash Raj
    I want to print all the lines except the last three lines from the input through awk only. Please note that my file contains n number of lines. For example, file.txt contains, foo bar foobar barfoo last line I want the output to be, foo bar foobar I know it could be possible through the combination of tac and sed or tac and awk $ tac file | sed '1,3d' | tac foo bar foobar $ tac file | awk 'NR==1{next}NR==2{next}NR==3{next}1' | tac foo bar foobar But i want the output through awk only.

    Read the article

  • Bash: command not found

    - by Alexandre Teles
    I have a script that needs to know the processor architecture. I'm doing this way: if [["$(uname -m)" = "x86_64"]]; then wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm else echo "Nossa! Você só pode usar 3,5GB de memória RAM. Que triste :( Vou baixar a versão 32bits pra você tá?" wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.rpm fi But when I execute the code, I receive: instala_chrome.sh: line 35: [[x86_64: command not found Anyone can help me to solve this? Thanks!

    Read the article

  • Create bootable USB install image from command line?

    - by j-g-faustus
    I'm trying to create a bootable USB image to install Ubuntu on a new computer. I have done this before following the "create USB drive" instructions for Ubuntu desktop, but I don't have an Ubuntu desktop available. How can I do the same using only the command line? Things I've tried: Create bootable USB on Mac OS X following the ubuntu.com "create USB drive" instructions for Mac: Doesn't boot. usb-creator: According to apt-cache search usb-creator and Wikipedia usb-creator only exists as a graphical tool. "Create manually" instructions at help.ubuntu.com: None of the files and directories described (e.g. casper, filesystem.manifest, menu.lst) exist in the ISO image, and I don't know what has replaced them. (At my disposal is Mac OS X and Ubuntu server; I have neither Ubuntu desktop nor Windows.)

    Read the article

  • Command line method to find disk usage of camera mounted using gvfs

    - by Hamish Downer
    When my camera was mounted on /media I could use the standard tools (df) to see the disk usage of the card in my camera. However now the camera is mounted using gvfs, and df seems to ignore it. I've also tried pydf and discus to no avail. The camera is definitely available through nautilus, and when I select the camera in nautlius, the status bar tells me the amount of disk free. I can also open the ~/.gvfs/ folder in nautilus and right click on the camera folder and get the disk usage in a graphical way. But that is no use for a script. Are there command line tools that are the equivalent of df for gvfs filesystems? Or even better, a way to make df report on gvfs filesystems?

    Read the article

  • grub recover command line

    - by Rakesh Mohan Hallen
    Recently the service provider link suddenly broke,while I was updating. Then suddenly while I was trying to boot, i could not. The message on my screen was grub recover missing, and I had no option but the grub recover command line. I really did not know what to do. So I installed an earlier version of ubuntu 10.04. It started to boot normally. Now my system is back to 12.04 the version i was working with. How does one handle problems like this?

    Read the article

  • C code - ls system command not showing bash colors

    - by m0atz
    I've just been fooling around with some code in C, an example of a really basic program is as follows which just, obviously, lists the directories using the ls system command. #include <stdio.h> int main (void) { system("ls -l -d */"); printf("I've just listed the directories :-)\n"); return 0; } This runs fine, but it shows the ls output in monochrome, whereas Bash would output the list using colors for the directories (or files if I included files). How can I make my C code use the bash colors? Thanks

    Read the article

  • A command-line clipboard copy and paste utility?

    - by Peter.O
    In Windows I used command-line clipboard copy-and-paste utilities... pclip.exe and gclip.exe These were UnixUtils ports for Windows (but they only handled plain text). There were a couple of other native Windows utils which could write/extracy any format. I've looked for something similar in Synaptic Package Manager, but I can't find anything. Is there something there, that I've missed? ... or maybe this is available in bash scripting? The type of utility I'd like will be able to read/write via std-in/std-out or file-in/file-out, and handle Unicode/Rich-text/Picture/etc clipboard formats... Late Edit: NB: I'm not after a clipboard manager.

    Read the article

  • Unable to run java file from command like Ubuntu

    - by KodeSeeker
    I'm a newbie to Ubuntu and Im looking to run Java code from the command line. Ive checked that path as well. The interesting thing is the code compiles but fails to run ie. user@ubuntu:~/py-scripts$ javac Main.java' works well. but when I do . `user@ubuntu:~/py-scripts$ java Main I get the following error Exception in thread "main" java.lang.UnsupportedClassVersionError: Main : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: Main. Program will exit.'

    Read the article

  • Hide debug information when running apps from the command line

    - by tutuca
    Most of the time running a gtk application from the command line it starts dumping debug information to the stdio even though I put them in background. Example: ~$ gedit test.html # and ctrl+z to suspend zsh: suspended gedit .zshrc ~$ bg [1] + continued gedit .zshrc ~$ # do some editing (gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (whoosh), this should not happen! (gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (haystack), this should not happen! I want to note that the error, or warning, changes according to what I'm doing at the moment. The GtkSourceView-WARNING shown here is one of the cases. Anyway... Do you know if it's at all possible to avoid getting that information printed out?

    Read the article

  • Mount encrypted volumes from command line?

    - by cha
    If I have an encrypted external disk (or an internal disk that is not in fstab), I see an entry for it in Nautilus -- with an entry like "X GB Encrypted Volume". I can click on this volume, and am prompted for a password to decrypt and mount the device. But how do I do this from the command line? This wiki page, and other docs I can find, only refer to GUI methods of decrypting the device; but this won't do in the context of headless servers or SSH logins. Is there a simple way to get devices to mount to automatic locations in "/media" just like they would with the GUI? (I'm not asking about encrypted home directories -- I'm aware of ecryptfs-mount-private. This question is about additional encrypted volumes.)

    Read the article

  • Looking for an old classic book about Unix command-line tools

    - by Little Bobby Tables
    I am looking for a book about the Unix command-line toolkit (sh, grep, sed, awk, cut, etc.) that I read some time ago. It was an excellent book, but I totally forgot its name. The great thing about this specific book was the running example. It showed how to implement a university bookkeeping system using only text-processing tools. You would find a student by name with grep, update grades with sed, calculate average grades with awk, attach grades to IDs with cut, and so on. If my memory serve, this book had a black cover, and was published circa 1980. Does anyone remember this book? I would appreciate any help in finding it.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >