Search Results

Search found 3548 results on 142 pages for 'unix'.

Page 11/142 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Understanding the Unix file system and ruby installs without Sudo

    - by JZ
    I'm trying to comprehend the Unix file system on my OSX. I'm following wikipedia Filesystem Hierarchy Standard. I understand when I install ruby gems I must use the command sudo gem install but if I omit sudo, problems may occur. Where are gems installed within the file system when I omit sudo? How can I delete these gems? A Fun side question: When I enter cd ~/.gem my terminal is directed to .gem user$, When I enter cd ~/ and list folders using the ls command I can't find a .gem folder. Where is the .gem folder? How does this fit into the Filesystem?

    Read the article

  • Les ventes de serveurs Unix s'effondrent d'après IDC, les serveurs x86 vont-ils conquérir le marché

    Les ventes de serveurs Unix s'effondrent d'après IDC, les serveurs x86 vont-ils conquérir le marché ? La crise économique actuelle a été dure envers certains secteurs, particulièrement celui des serveurs Unix. Les derniers chiffres publiés par IDC montrent de réelles difficultés. Les parts de marché des systèmes Unix se sont effondrées ces derniers mois, jusqu'à atteindre l'un des niveaux les plus bas jamais atteint. Les achats prévus par des nombreuses entreprises ne se seraient pas concrétisés. Les revenus mondiaux d'Unix seraient de 2.3 milliards de dollars pour le premier trimestre 2010. La part des rentrées liées aux serveurs a chuté de 10.5% par rapport au premier trimestre 2009. Avec l'augment...

    Read the article

  • Creating a project, from Makefile to static/dynamic libraries in UNIX

    - by Sasha
    Guys, would you describe a few things about c++ building blocks, on unix. I want to create an application that links against static libs and dynamic libs (.so). Question 1: How do I create static library using gcc/g++ ?How do I make my app link against it. Question 2: How to specify it in the makefile, linking against static and dynamic libs, assuming that both libraries have header files Summary: I have been using makefiles and libraries for years, written by someone else. Thus every time I modified it, I simply cut-and-pasted things around, without really understanding it. Now I want to get down to the ground and understand the building/linking/Creating Makfile process in-depth. What is a good book describing these concepts in intimate details? Thanks

    Read the article

  • Problem with graphiz on Unix

    - by J3n
    When I'm on Unix, my graphs with graphphiz are less nice. The tail or the head of the edge is not always linked to the boundary of the port. You can see the result here : http://www.freeimagehosting.net/image.php?59d8eb4b30.jpg <xsl:value-of select="$source"/>:<xsl:value-of select="$prot"/> -&gt; <xsl:value-of select="$destination"/>:<xsl:value-of select="$prot"/>[color="black",label="<xsl:value-of select="$prot"/>",fontcolor="black",tailclip=true,headclip=true];

    Read the article

  • C++: How would I get unix time?

    - by John D.
    I need a function or way to get the UNIX epoch in seconds, much like how I can in PHP using the time function. I can't find any method except the time() in ctime which seems to only output a formatted date, or the clock() function which has seconds but seems to always be a multiple of 1 million, nothing with any resolution. I wish to measure execution time in a program, I just wanted to calculate the diff between start and end; how would a C++ programmer do this? EDIT: time() and difftime only allow resolution by seconds, not ms or anything too btw.

    Read the article

  • C language - Fscanf and sprint commands in unix environment

    - by yanag
    I am trying to read file with 30 rows and 5 columns with separator of "tab". Each time I get only part of the rows. In the windows environment it's working good. Any idea why in unix it is not working? while (fscanf(FFMapFile,"%s\t%s\t%s\t%s\t%s\t",fnfMap[i].COS_ID,fnfMap[i].FF_First_Act,fnfMap[i].FF_Next_Act,fnfMap[i].Free_FF_allowed,fnfMap[i].FF_Change_Charge)!=EOF) { sprintf(s,"%s\t%s\t%s\t%s\t%s\t",fnfMap[i].COS_ID,fnfMap[i].FF_First_Act,fnfMap[i].FF_Next_Act,fnfMap[i].Free_FF_allowed,fnfMap[i].FF_Change_Charge); error_log(s,ERROR); i++; }

    Read the article

  • processing a file full of unix time strings to human readble

    - by skymook
    I am processing a file full of unix time strings. I want to convert them all to human readable. The file looks like so: 1153335401 1153448586 1153476729 1153494310 1153603662 1153640211 Here is the script: #! /bin/bash FILE="test.txt" cat $FILE | while read line; do perl -e 'print scalar(gmtime($line)), "\n"' done This is not working. The output I get is Thu Jan 1 00:00:00 1970 for every line. I think the line breaks are being picked up and that is why it is not working. Any ideas? I'm using Mac OSX is that makes any difference.

    Read the article

  • The conventional location for storing my Java libraries and applications in UNIX based systems

    - by Bytecode Ninja
    I usually store the Java applications and JAR files that I download from the Web in the ~/Java folder on my computer (an OS X machine). I have been doing this since the days when I was a Windows user. However I think in UNIX based systems user local apps are conventionally stored in another directory. I have a feeling that this directory should either be /usr/local/, /usr/local/USERNAME, /opt/local, or /opt/local/USERNAME but I am not sure. Any ideas which directory can I use for this purpose? Please note that, I am talking about archive files that I download from the Web, unpack and use locally and not programs that have installation scripts or MacPorts, etc.

    Read the article

  • How to evaluate text strings provided by sed/grep/whatever?

    - by T.J.
    This is for UNIX shell programming. It have to be supported by multiple UNIX platforms including Solaris, Linux, and AIX. I have this scenario -- I am to read from a text file a string that may or may not contain an environment variable that may or may not be defined. For example: <foo.bar> This error code was found: $(error_code) I have the following code: statement=$(sed -n $1'p' $messagefile) echo $echo_flag $statement $1 = line number supplied to this particular function/script. $messagefile = filename of log file. $echo_flag = "-e" in Linux, otherwise, empty. $(error_code) = 42. Instead of getting this when running: <foo.bar> This error code was found: 42 I still get this: <foo.bar> This error code was found: $(error_code) How exactly do I tell the shell script that the value of statement should be evaluated further beyond what sed have done?

    Read the article

  • Bible reference books (PHP / MySQL / Unix)

    - by Josh K
    I'm looking for some nice heavy books to liter around my desk and make it look like I'm a hard core programmer. On the occasion that I might want to look something up they will also need to be useful dependable books. I'm looking for the equivalent bible in PHP, MySQL, and Unix. Should be laid out with some chapters I can actually read, along with having an in-depth reference to that particular subject. I know that the majority of this can be found on Google, but I would prefer it in book form.

    Read the article

  • Hopping from a C++ to a Perl/Unix job

    - by rocknroll
    Hi all, I have been a C++ / Linux Developer till now and I am adept in this stack. Of late I have been getting opportunities that require Perl, Unix (with knowledge of C++,shell scripting) expertise. Organizations are showing interest even though I don't have much scripting experience to boast off. The role is more in a Support, maintenance project involving SQL as well. Off late I am in a fix whether to forgo these offers or not. I don't know the dynamics of an IT organization and thus on one hand I fear that my C++ experience will be nullified and on the positive side I am getting to work on a new technology stack which will only add to my skill set. I am sure, most of you at some point of time have encountered such dilemmas and would have taken some decision. I want you to share your perspectives on such a scenario where a person is required to change his/her technology stack when changing his/her job. What are the merits and demerits in going with either of the choices? Also I know that C++ isn't going anywhere in the near future. What about perl? I have no clue as to what the future holds for perl developer? Whether there are enough opportunities for a perl developer? I am asking this question here because most of my fellow programmers face this career choice dilemma. Thanks.

    Read the article

  • unix at command pass variable to shell script?

    - by Andrew
    Hi, I'm trying to setup a simple timer that gets started from a Rails Application. This timer should wait out its duration and then start a shell script that will start up ./script/runner and complete the initial request. I need script/runner because I need access to ActiveRecord. Here's my test lines in Rails output = `at #{(Time.now + 60).strftime("%H:%M")} < #{Rails.root}/lib/parking_timer.sh STRING_VARIABLE` return render :text => output Then my parking_timer.sh looks like this #!/bin/sh ~/PATH_TO_APP/script/runner -e development ~/PATH_TO_APP/lib/ParkingTimer.rb $1 echo "All Done" Finally, ParkingTimer.rb reads the passed variable with ARGV.each do|a| puts "Argument: #{a}" end The problem is that the Unix command "at" doesn't seem to like variables and only wants to deal with filenames. I either get one of two errors depending on how I position "s If I put quotes around the right hand side like so ... "~/PATH_TO_APP/lib/parking_timer.sh STRING_VARIABLE" I get, -bash: ~/PATH_TO_APP/lib/parking_timer.sh STRING_VARIABLE: No such file or directory I I leave the quotes out, I get, at: garbled time This is all happening on a Mac OS 10.6 box running Rails 2.3 & Ruby 1.8.6 I've already messed around w/ BackgrounDrb, and decided its a total PITA. I need to be able to cancel the job at any time before it is due.

    Read the article

  • On Linux/Unix, does .tar.gz versus .zip matter?

    - by rwallace
    Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different. If, however, the contents are going to be the same, it would be simpler to just have one download. Windows prefers .zip because that's the format it can handle out of the box. Does it matter on Unix? That is, I tried today unzipping a file on Ubuntu Linux, and it worked fine; is there any problem with this on any current Unix-like operating system, or is it okay to just provide a .zip file across the board?

    Read the article

  • Is Cygwin the best Unix environment for Windows? [closed]

    - by nik
    Which Unix like environment do you prefer on Windows? I have found Cygwin to be very comfortable for a Windows platform (usually XP). I am wondering if there is a better alternative (not because I want to move away from Cygwin). What are the features of Cygwin that you like OR, What are features you find in alternatives that you miss in Cygwin? I am often miss binary compatibility of applications built on Cygwin. These cannot be run directly on another Windows platform. But, usually fetching a copy of cygwin1.dll suffices. A collection of other tools, many of which work directly on the Windows subsystem rather than emulating Unix, like Cygwin does: Have been referred PowerShell a lot of times for scripting on Windows Earlier, UnixUtils was suggested more often Microsoft Windows Services for Unix

    Read the article

  • On Linux/Unix, does .tar.gz versus .zip matter?

    - by rwallace
    Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different. If, however, the contents are going to be the same, it would be simpler to just have one download. Windows prefers .zip because that's the format it can handle out of the box. Does it matter on Unix? That is, I tried today unzipping a file on Ubuntu Linux, and it worked fine; is there any problem with this on any current Unix-like operating system, or is it okay to just provide a .zip file across the board?

    Read the article

  • How to compile a C++ source code written for Linux/Unix on Windows Vista (code given)

    - by HTMZ
    I have a c++ source code that was written in linux/unix environment by some other author. It gives me errors when i compile it in windows vista environment. I am using Bloodshed Dev C++ v 4.9. please help. #include <iostream.h> #include <map> #include <vector> #include <string> #include <string.h> #include <strstream> #include <unistd.h> #include <stdlib.h> using namespace std; template <class T> class PrefixSpan { private: vector < vector <T> > transaction; vector < pair <T, unsigned int> > pattern; unsigned int minsup; unsigned int minpat; unsigned int maxpat; bool all; bool where; string delimiter; bool verbose; ostream *os; void report (vector <pair <unsigned int, int> > &projected) { if (minpat > pattern.size()) return; // print where & pattern if (where) { *os << "<pattern>" << endl; // what: if (all) { *os << "<freq>" << pattern[pattern.size()-1].second << "</freq>" << endl; *os << "<what>"; for (unsigned int i = 0; i < pattern.size(); i++) *os << (i ? " " : "") << pattern[i].first; } else { *os << "<what>"; for (unsigned int i = 0; i < pattern.size(); i++) *os << (i ? " " : "") << pattern[i].first << delimiter << pattern[i].second; } *os << "</what>" << endl; // where *os << "<where>"; for (unsigned int i = 0; i < projected.size(); i++) *os << (i ? " " : "") << projected[i].first; *os << "</where>" << endl; *os << "</pattern>" << endl; } else { // print found pattern only if (all) { *os << pattern[pattern.size()-1].second; for (unsigned int i = 0; i < pattern.size(); i++) *os << " " << pattern[i].first; } else { for (unsigned int i = 0; i < pattern.size(); i++) *os << (i ? " " : "") << pattern[i].first << delimiter << pattern[i].second; } *os << endl; } } void project (vector <pair <unsigned int, int> > &projected) { if (all) report(projected); map <T, vector <pair <unsigned int, int> > > counter; for (unsigned int i = 0; i < projected.size(); i++) { int pos = projected[i].second; unsigned int id = projected[i].first; unsigned int size = transaction[id].size(); map <T, int> tmp; for (unsigned int j = pos + 1; j < size; j++) { T item = transaction[id][j]; if (tmp.find (item) == tmp.end()) tmp[item] = j ; } for (map <T, int>::iterator k = tmp.begin(); k != tmp.end(); ++k) counter[k->first].push_back (make_pair <unsigned int, int> (id, k->second)); } for (map <T, vector <pair <unsigned int, int> > >::iterator l = counter.begin (); l != counter.end (); ) { if (l->second.size() < minsup) { map <T, vector <pair <unsigned int, int> > >::iterator tmp = l; tmp = l; ++tmp; counter.erase (l); l = tmp; } else { ++l; } } if (! all && counter.size () == 0) { report (projected); return; } for (map <T, vector <pair <unsigned int, int> > >::iterator l = counter.begin (); l != counter.end(); ++l) { if (pattern.size () < maxpat) { pattern.push_back (make_pair <T, unsigned int> (l->first, l->second.size())); project (l->second); pattern.erase (pattern.end()); } } } public: PrefixSpan (unsigned int _minsup = 1, unsigned int _minpat = 1, unsigned int _maxpat = 0xffffffff, bool _all = false, bool _where = false, string _delimiter = "/", bool _verbose = false): minsup(_minsup), minpat (_minpat), maxpat (_maxpat), all(_all), where(_where), delimiter (_delimiter), verbose (_verbose) {}; ~PrefixSpan () {}; istream& read (istream &is) { string line; vector <T> tmp; T item; while (getline (is, line)) { tmp.clear (); istrstream istrs ((char *)line.c_str()); while (istrs >> item) tmp.push_back (item); transaction.push_back (tmp); } return is; } ostream& run (ostream &_os) { os = &_os; if (verbose) *os << transaction.size() << endl; vector <pair <unsigned int, int> > root; for (unsigned int i = 0; i < transaction.size(); i++) root.push_back (make_pair (i, -1)); project (root); return *os; } void clear () { transaction.clear (); pattern.clear (); } }; int main (int argc, char **argv) { extern char *optarg; unsigned int minsup = 1; unsigned int minpat = 1; unsigned int maxpat = 0xffffffff; bool all = false; bool where = false; string delimiter = "/"; bool verbose = false; string type = "string"; int opt; while ((opt = getopt(argc, argv, "awvt:M:m:L:d:")) != -1) { switch(opt) { case 'a': all = true; break; case 'w': where = true; break; case 'v': verbose = true; break; case 'm': minsup = atoi (optarg); break; case 'M': minpat = atoi (optarg); break; case 'L': maxpat = atoi (optarg); break; case 't': type = string (optarg); break; case 'd': delimiter = string (optarg); break; default: cout << "Usage: " << argv[0] << " [-m minsup] [-M minpat] [-L maxpat] [-a] [-w] [-v] [-t type] [-d delimiter] < data .." << endl; return -1; } } if (type == "int") { PrefixSpan<unsigned int> prefixspan (minsup, minpat, maxpat, all, where, delimiter, verbose); prefixspan.read (cin); prefixspan.run (cout); }else if (type == "short") { PrefixSpan<unsigned short> prefixspan (minsup, minpat, maxpat, all, where, delimiter, verbose); prefixspan.read (cin); prefixspan.run (cout); } else if (type == "char") { PrefixSpan<unsigned char> prefixspan (minsup, minpat, maxpat, all, where, delimiter, verbose); prefixspan.read (cin); prefixspan.run (cout); } else if (type == "string") { PrefixSpan<string> prefixspan (minsup, minpat, maxpat, all, where, delimiter, verbose); prefixspan.read (cin); prefixspan.run (cout); } else { cerr << "Unknown Item Type: " << type << " : choose from [string|int|short|char]" << endl; return -1; } return 0; }

    Read the article

  • Regarding Shell Script

    - by arav
    I have the below line in the unix shell script. I want to exclude test.jar in WEB-INF/lib being added to the CLASSPATH. How can i do it? for file in WEB-INF/lib/*jar ; do CLASSPATH=$CLASSPATH:$PWD/$file done

    Read the article

  • How do I change the default for the "df" command in the Unix terminal from KILOBYTES TO MEGABYTES?

    - by user1656014
    I can't really show the code in Unix, but I can explain it very clearly. In the terminal, when you type "df", you get information on the disk free space all in KILOBYTE units. KILOBYTES is currently set as the default in Unix. My problem is trying to change the default from KILOBYTES to MEGABYTES. After changing of the default, I should be able to type in "df" and all the disk free space should come up in MEGABYTES.

    Read the article

  • Add the "SAMBA File Server" role to a server running SCO Unix?

    - by I.T. Support
    We're trying to get network access to a hard drive on a server running SCO Unix from Windows Servers. I beleive we need to add the role "SAMBA File Server" to the server so we can mount the drive as a network share that we can access from Windows. Is it possible to add the SAMBA role to a SCO Unix operating system? Are there any gotchas or concerns? Thanks

    Read the article

  • Creating a directory and parents directory in unix

    - by eveo
    I can't believe such a simple homework question is messing with me: Enter the Linux command to create both a parent directory called 'systems' and it's child directory called 'part3' at the same time. Assume that directory 'systems' will branch-off your home directory and that you are in your home directory to start. Use a relative pathname. You entered: mkdir -p ~/part3/systems/ Please try again. Hint: Use mkdir with the appropriate option Tried: mkdir -p ~/systems/part3/ mkdir -p ~systems/part3 mkdir -p ~/systems/part3 mkdir -p ~/systems/part3 mkdir ~/systems/part3/ mkdir ~systems/part3 mkdir ~/systems/part3 mkdir ~/systems/part3

    Read the article

  • Joining Multiple Fields Using Unix Join

    - by neversaint
    How can I do it? I have a file that looks like this foo 1 scaf 3 bar 2 scaf 3.3 File2 looks like this foo 1 scaf 4.5 foo 1 boo 2.3 bar 2 scaf 1.00 What I want to do is to fine lines that co-occur in file1 and file2 when field 1,2,3 are the same. Is there a way to do it?

    Read the article

  • Rename multiple files in Unix

    - by john
    There are multiple files in a directory that begin with prefix fgh, for example: fghfilea fghfileb fghfilec I want to rename all of them to begin with prefix jkl. Is there a single command to do that instead of renaming each file individually?

    Read the article

  • Unix diff to only print relevant diff

    - by mkal
    I have these two files File:11 11 12345 File:22 123 456 Output of diff 11 22 2c2 < 456123 --- > 789 Output to be < 456123 > 789 I want it to not print 2c2 and "--" line. I looked at the man page but could not locate any help. Any ideas? The file has more than 1K lines

    Read the article

  • Regarding UNIX Shell Script

    - by arav
    When there is no files inside the folder the below script goes inside the for loop. Not sure what i can modify so that it doesn't go inside the for loop. Also when there is no files inside the directory exit status should be success. Wrapper script checks the exit status of the below script FILESRAW ="/exp/test1/folder" . for fspec in "$FILESRAW"/* ; do echo "$fspec" if [[ -f ${fspec} ]] ; then ..... processing logic else ... processing logic fi done

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >