Search Results

Search found 2375 results on 95 pages for 'dir'.

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

  • vba: a forever loop

    - by I__
    Sub something(tecan) On Error Resume Next Dim arr As New Collection, a Dim aFirstArray() As Variant Dim i As Long aFirstArray() = Array(Dir(tecan & "*.ESY", vbNormal)) aFirstArray(0) = Mid(aFirstArray(0), 1, 4) Do While Dir <> "" ReDim Preserve aFirstArray(UBound(aFirstArray) + 1) aFirstArray(UBound(aFirstArray)) = Mid(Dir, 1, 4) Loop On Error Resume Next For Each a In aFirstArray arr.Add a, a Next For i = 1 To arr.Count Cells(i, 1) = arr(i) 'open_esy (tecan & arr(i) & "*") Next Erase aFirstArray For i = 1 To arr.Count arr.Remove i Next i here is how i call this sub: something (tecan1) something (tecan2) on the first call it works and does what it is supposed to but on the second call it gets stuck in this loop: Do While Dir <> "" ReDim Preserve aFirstArray(UBound(aFirstArray) + 1) aFirstArray(UBound(aFirstArray)) = Mid(Dir, 1, 4) Loop why does it get stuck in the loop?

    Read the article

  • testing directory S_ISDIR acts inconsistently

    - by coubeatczech
    hi, I'm doing simple tests on all files in directory. But from some reason, sometimes, they behave wrongly? What's bad with my code? using namespace std; int main() { string s = "/home/"; struct dirent * file; DIR * dir = opendir(s.c_str()); while ((file = readdir(dir)) != NULL){ struct stat * file_info = new (struct stat); stat(file-d_name,file_info); if ((file_info-st_mode & S_IFMT) == S_IFDIR) cout << "dir" << endl; else cout << "other" << endl; } closedir(dir); }

    Read the article

  • Copying files from one directory to another in Java

    - by user42155
    Hello, I want to copy files from one directory to another (subdirectory) using Java. I have a directory, dir, with text files. I iterate over the first 20 files in dir, and want to copy them to another directory in the dir directory, which I have created right before the iteration. In the code, I want to copy the review (which represents the ith text file or review) to trainingDir. How can I do this? There seems not to be such a function (or I couldn't find). Thank you. boolean success = false; File[] reviews = dir.listFiles(); String trainingDir = dir.getAbsolutePath() + "/trainingData"; File trDir = new File(trainingDir); success = trDir.mkdir(); for(int i = 1; i <= 20; i++) { File review = reviews[i]; }

    Read the article

  • In a C++ template, is it allowed to return an object with spesific type parameters?

    - by nieldw
    When I've got a template with certain type parameters, is it allowed for a function to return an object of this same template, but with different types? In other words, is the following allowed? template<class edgeDecor, class vertexDecor, bool dir> Graph<edgeDecor,int,dir> Graph<edgeDecor,vertexDecor,dir>::Dijkstra(vertex s, bool print = false) const { /* Construct new Graph with apropriate decorators */ Graph<edgeDecor,int,dir> span = new Graph<edgeDecor,int,dir>(); /* ... */ return span; }; If this is not allowed, how can I accomplish the same kind of thing?

    Read the article

  • In a C++ template, is it allowed to return an object with specific type parameters?

    - by nieldw
    When I've got a template with certain type parameters, is it allowed for a function to return an object of this same template, but with different types? In other words, is the following allowed? template<class edgeDecor, class vertexDecor, bool dir> Graph<edgeDecor,int,dir> Graph<edgeDecor,vertexDecor,dir>::Dijkstra(vertex s, bool print = false) const { /* Construct new Graph with apropriate decorators */ Graph<edgeDecor,int,dir> span = new Graph<edgeDecor,int,dir>(); /* ... */ return span; }; If this is not allowed, how can I accomplish the same kind of thing?

    Read the article

  • MEB Support to NetBackup MMS

    - by Hema Sridharan
    In MySQL Enterprise Backup 3.6, new option was introduced to support backup to tapes via SBT interface. SBT stands for System Backup to Tape, an Oracle API that helps to perform backup and restore jobs via media management software such as Oracle's Secure Backup (OSB). There are other storage managers like IBM's Tivoli Storage Manager (TSM) and Symantec's Netbackup (NB) which are also supported by MEB but we don't guarantee that it will function as expected for every release. MEB supports SBT API version 2.0 In this blog, I am primarily going to focus the interface of MEB and Symantec's NB. If we are using tapes for backup, ensure that tape library and tape drives are compatible. Test Setup 1. Install NB 7.5 master and media servers in Linux OS. ( NB 7.1 can also be used but for testing purpose I used NB 7.5)2. Install MEB 3.8 also in Linux OS.3. Install NB admin console in your windows desktop and configure the NB master server from there. Note: Ensure that you have root user permission to install NetBackup. Configuration Steps for MEB and NB Once MEB and NB are installed, Ensure that NB is linked to MEB by specifying the library /usr/openv/netbackup/bin/libobk.so64 in the mysqlbackup command line using --sbt-lib-path. Configure the NB master server from windows console. That is configure the storage units by specifying the Storage unit name, Disk type, Media Server name etc.  Create NetBackup policies that are user selectable. But please make sure that policy type is "Oracle".  Define the clients where MEB will be executed. Some times this will be different host where MEB is run or some times in same Media server where NB and tapes are attached. Now once the installation and configuration steps are performed for MEB and NB, the next part is the actual execution.MEB should be run as single file backup using --backup-image option with prefix sbt:(it is a tag which tells MEB that it should stream the backup image through the SBT interface) which is sent to NB client via SBT interface . The resulting backup image is stored where NB stores the images that it backs up. The following diagram shows how MEB interacts with MMS through SBT interface. Backup The following parameters should also be ready for the execution,    --sbt-lib-path : Path to SBT library specific to NetBackup MMS. SBT lib for NetBackup  is in /usr/openv/netbackup/bin/libobk.so64    --sbt-environment: Environment variables must be defined specific to NetBackup. In our example below, we use     NB_ORA_SERV=myserver.com,    NB_ORA_CLIENT=myserver.com,    NB_ORA_POLICY=NBU-MEB    ORACLE_HOME = /export/home2/tmp/hema/mysql-server/ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ./mysqlbackup --port=13000 --protocol=tcp --user=root --backup-image=sbt:bkpsbtNB --sbt-lib-path=/usr/openv/netbackup/bin/libobk.so64 --sbt-environment="NB_ORA_SERV=myserver.com, NB_ORA_CLIENT=myserver.com, NB_ORA_POLICY=NBU-MEB, ORACLE_HOME=/export/home2/tmp/hema/mysql-server/” --backup-dir=/export/home2/tmp/hema/MEB_bkdir/ backup-to-image ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Once backup is completed successfully, this should appear in Activity Monitor in NetBackup Console.For restore,  image contents has to be extracted using image-to-backup-dir command and then apply-log and copy-back steps are applied. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ./mysqlbackup --sbt-lib-path=/usr/openv/netbackup/bin/libobk.so64  --backup-dir=/export/home2/tmp/hema/NBMEB/ --backup-image=sbt:bkpsbtNB image-to-backup-dir-----------------------------------------------------------------------------------------------------------------------------------Now apply logs as usual, shutdown the server and perform restore, restart the server and check the data contents. ./mysqlbackup   ---backup-dir=/export/home2/tmp/hema/NBMEB/  apply-log ./mysqlbackup --datadir=/export/home2/tmp/hema/mysql-server/mysql-5.5-meb-repo/mysql-test/var/mysqld.1/data/  --backup-dir=/export/home2/tmp/hema/MEB_bkpdir/ innodb_log_files_in_group=2 --innodb_log_file_size=5M --user=root --port=13000 --protocol=tcp copy-back The NB console should show 'Restore" job as done. If you don't see that there is something wrong with MEB or NetBackup.You can also refer to more detailed steps of MEB and NB integration in whitepaper here

    Read the article

  • Some PowerShell goodness

    - by KyleBurns
    Ever work somewhere where processes dump files into folders to maintain an archive?  Me too and Windows Explorer hates it.  Very often I find myself needing to organize these files into subfolders so that I can go after files without locking up Windows Explorer and my answer used to be to write a program in something like C# to do the job.  These programs will typically enumerate the files in a folder and move each file to a subdirectory named based on a datestamp.  The last such program I wrote had to use lower-level Win32 API calls to perform the enumeration because it appears the standard .Net calls make use of the same method of enumerating the directories that Windows Explorer chokes on when dealing with a large number of entries in a particular directory, so a simple task was accomplished with a lot of code. Of course, this little utility was just something I used to make my life easier and "not a production app", so it was in my local source folder and not source control when my hard drive died.  So... I was getting ready to re-create it and thought it might be a good idea to play with PowerShell a bit - something I had been wanting to do but had not yet met a requirement to make me do it.  The resulting script was amazingly succinct and even building the flexibility for parameterization and adding line breaks for readability was only about 25 lines long.  Here's the code with discussion following: param(     [Parameter(         Mandatory = $false,         Position = 0,         HelpMessage = "Root of the folders or share to archive.  Be sure to end with appropriate path separator"     )]     [String] $folderRoot="\\fileServer\pathToFolderWithLotsOfFiles\",       [Parameter(         Mandatory = $false,         Position = 1     )]     [int] $days = 1 ) dir $folderRoot|?{(!($_.PsIsContainer)) -and ((get-date) - $_.lastwritetime).totaldays -gt $days }|%{     [string]$year=$([string]$_.lastwritetime.year)     [string]$month=$_.lastwritetime.month     [string]$day=$_.lastwritetime.day     $dir=$folderRoot+$year+"\"+$month+"\"+$day     if(!(test-path $dir)){         new-item -type container $dir     }     Write-output $_     move-item $_.fullname $dir } The script starts by declaring two parameters.  The first parameter holds the path to the folder that I am going to be sorting into subdirectories.  The path separator is intended to be included in this argument because I didn't want to mess with determining whether this was local or UNC and picking the right separator in code, but this could be easily improved upon using Path.Combine since PowerShell has access to the full framework libraries.  The second parameter holds a minimum age in days for files to be removed from the root folder.  The script then pipes the dir command through a query to include only files (by excluding containers) and of those, only entries that meet the age requirement based on the last modified datestamp.  For each of those, the datestamp is used to construct a folder name in the format YYYY\MM\DD (if you're in an environment where even a day's worth of files need further divided, you could make this more granular) and the folder is created if it does not yet exist.  Finally, the file is moved into the directory. One of the things that was really cool about using PowerShell for this task is that the new-item command is smart enough to create the entire subdirectory structure with a single call.  In previous code that I have written to do this kind of thing, I would have to test the entire tree leading down to the subfolder I want, leading to a lot of branching code that detracted from being able to quickly look at the code and understand the job it performs. Overall, I have to say I'm really pleased with what has been done making PowerShell powerful and useful.

    Read the article

  • Converting from CVS to SVN to Hg, does 'hg convert' require pointing to an SVN checkout or just a re

    - by Terry
    As part of migrating full CVS history to Hg, I've used cvs2svn to create an SVN repo in a local directory. It's first level directory structure is: 2010-04-21 09:39 AM <DIR> . 2010-04-21 09:39 AM <DIR> .. 2010-04-21 09:39 AM <DIR> locks 2010-04-21 09:39 AM <DIR> hooks 2010-04-21 09:39 AM <DIR> conf 2010-04-21 09:39 AM 229 README.txt 2010-04-21 11:45 AM <DIR> db 2010-04-21 09:39 AM 2 format 2 File(s) 231 bytes After setting up hg and the convert extension and attempting the convert, I get the following on convert: C:\>hg convert file://localhost/Users/terry/Desktop/repoSVN assuming destination repoSVN-hg initializing destination repoSVN-hg repository file://localhost/Users/terry/Desktop/repoSVN does not look like a CVS checkout file://localhost/Users/terry/Desktop/repoSVN does not look like a Git repo file://localhost/Users/terry/Desktop/repoSVN does not look like a Subversion repo file://localhost/Users/terry/Desktop/repoSVN is not a local Mercurial repo file://localhost/Users/terry/Desktop/repoSVN does not look like a darcs repo file://localhost/Users/terry/Desktop/repoSVN does not look like a monotone repo file://localhost/Users/terry/Desktop/repoSVN does not look like a GNU Arch repo file://localhost/Users/terry/Desktop/repoSVN does not look like a Bazaar repo file://localhost/Users/terry/Desktop/repoSVN does not look like a P4 repo abort: file://localhost/Users/terry/Desktop/repoSVN: missing or unsupported repository I have TortoiseHg installed. For info, hg version reports: Mercurial Distributed SCM (version 1.4.3) This version of Mercurial seems to have some svn bindings if library.zip in the install is to be believed. Do I need to do a checkout and point hg convert to it for this to work properly?

    Read the article

  • In Netbeans, how do I avoid wsimport rebuilding web service clients every build?

    - by gustafc
    I'm on a project where we use NetBeans (6.8). We use several different web services, which we have added as web service references, and Netbeans auto-generates the Ant wsimport scripts for us. Very handy, with one drawback: The web service clients are recompiled every time ant is invoked. This slows down the build process considerably and has caused the number of sword-related injuries, maimings and deaths to skyrocket. Normally, I'd fix this by changing the wsimport element from <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService" destdir="${build.generated.dir}/jax-wsCache/PonyService" wsdl="${wsdl-PonyService}" catalog="catalog.xml" verbose="true"/> to <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService" destdir="${build.generated.dir}/jax-wsCache/PonyService" wsdl="${wsdl-PonyService}" catalog="catalog.xml" verbose="true"> <produces dir="${build.generated.dir}/jax-wsCache/PonyService" /> </wsimport> But I can't, 'cause this part of the Ant script is auto-generated. If I right-click the PonyService web service reference and select Edit Web Service Attributes ⇒ wsimport options, I can add attributes to the wsimport element, but not child elements. So: How do I add the produces child element to wsimport other than hacking the auto-generated Ant script? Or more generally: How do I make the NetBeans-generated wsimport not recompile the web service clients every time I build?

    Read the article

  • In Netbeans+Ant, how do I avoid wsimport rebuilding web service clients every build?

    - by gustafc
    I'm on a project where we use NetBeans (6.8). We use several different web services, which we have added as web service references, and Netbeans auto-generates the Ant wsimport scripts for us. Very handy, with one drawback: The web service clients are recompiled every time ant is invoked. This slows down the build process considerably and has caused the number of sword-related injuries, maimings and deaths to skyrocket. Normally, I'd fix this by changing the wsimport element from <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService" destdir="${build.generated.dir}/jax-wsCache/PonyService" wsdl="${wsdl-PonyService}" catalog="catalog.xml" verbose="true"/> to <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService" destdir="${build.generated.dir}/jax-wsCache/PonyService" wsdl="${wsdl-PonyService}" catalog="catalog.xml" verbose="true"> <produces dir="${build.generated.dir}/jax-wsCache/PonyService" /> </wsimport> But I can't, 'cause this part of the Ant script is auto-generated. If I right-click the PonyService web service reference and select Edit Web Service Attributes ⇒ wsimport options, I can add attributes to the wsimport element, but not child elements. So: How do I add the produces child element to wsimport other than hacking the auto-generated Ant script? Or more generally: How do I make the NetBeans-generated wsimport not recompile the web service clients every time I build?

    Read the article

  • Crash in C++ Code

    - by Ankuj
    I am trying to list all files in a directory recursively. But my code crashes without giving any error. When the given file is directory I recursively call the function or else print its name. I am using dirent.h int list_file(string path) { DIR *dir; struct dirent *ent; char *c_style_path; c_style_path = new char[path.length()]; c_style_path = (char *)path.c_str(); dir = opendir (c_style_path); if (dir != NULL) { /* print all the files and directories within directory */ while ((ent = readdir (dir)) != NULL) { if(ent->d_type == DT_DIR && (strcmp(ent->d_name,".")!=0) && (strcmp(ent->d_name,"..")!=0)) { string tmp = path + "\\" + ent->d_name; list_file(tmp); } else { cout<<ent->d_name<<endl; } } closedir (dir); } else { /* could not open directory */ perror (""); return EXIT_FAILURE; } delete [] c_style_path; return 0; } I am not getting as to what I am doing wrong here. Any clues ?

    Read the article

  • (PHP) How do I get XMLReader behave like SimpleXML with Xpath? (Large directory like XML file)

    - by AESM
    So, I've got this huge XML file (10MB and up) that I want to parse and I figured instead of using SimpleXML, I'd better use XMLReader. Since the performance should be way better, right? But since XMLReader doesn't work with XPath... The xml is like this: <root name="bookmarks"> * <dir name="A directory"> <link name="blablabla"> <dir name="Sub directory"> ... </dir> * </dir> * <link name="another link"> </root> With SimpleXML combined with Xpath, I would simple do like: $xml = simplexml_load_file('/xmlFile.xml'); $xml-xpath('/root[@name]/dir[@name="A directory"]/dir[@name="Sub directory"]'); Which is so simple. But how do I do this with just using XMLReader? Ps. I'm converting the resulting node to DOM/SimpleXML to get its inner contents. Like this: $node = $xr-expand(); $dom = new DomDocument(); $n = $dom-importNode($node, true); $dom-appendChild($n); $selectedRoot = simplexml_import_dom($dom); Is this ok? ... Thanks!

    Read the article

  • rotating an object on an arc

    - by gardian06
    I am trying to get a turret to rotate on an arc, and have hit a wall. I have 8 possible starting orientations for the turrets, and want them to rotate on a 90 degree arc. I currently take the starting rotation of the turret, and then from that derive the positive, and negative boundary of the arc. because of engine restrictions (Unity) I have to do all of my tests against a value which is between [0,360], and due to numerical precision issues I can not test against specific values. I would like to write a general test without having to go in, and jury rig cases //my current test is: // member variables public float negBound; public float posBound; // found in Start() function (called immediately after construction) // eulerAngles.y is the the degree measure of the starting y rotation negBound = transform.eulerAngles.y-45; posBound = transform.eulerAngles.y+45; // insure that values are within bounds if(negBound<0){ negBound+=360; }else if(posBound>360){ posBound-=360; } // called from Update() when target not in firing line void Rotate(){ // controlls what direction if(transform.eulerAngles.y>posBound){ dir = -1; } else if(transform.eulerAngles.y < negBound){ dir = 1; } // rotate object } follows is a table of values for my different cases (please excuse my force formatting) read as base is the starting rotation of the turret, neg is the negative boundry, pos is the positive boundry, range is the acceptable range of values, and works is if it performs as expected with the current code. |base-|-neg-|-pos--|----------range-----------|-works-| |---0---|-315-|--45--|-315-0,0-45----------|----------| |--45--|---0---|--90--|-0-45,54-90----------|----x----| |-135-|---90--|-180-|-90-135,135-180---|----x----| |-180-|--135-|-225-|-135-180,180-225-|----x----| |-225-|--180-|-270-|-180-225,225-270-|----x----| |-270-|--225-|-315-|-225-270,270-315-|----------| |-315-|--270-|---0---|--270-315,315-0---|----------| I will need to do all tests from derived, or stored values, but can not figure out how to get all of my cases to work simultaneously. //I attempted to concatenate the 2 tests: if((transform.eulerAngles.y>posBound)&&(transform.eulerAngles.y < negBound)){ dir *= -1; } this caused only the first case to be successful // I attempted to store a opposite value, and do a void Rotate(){ // controlls what direction if((transform.eulerAngles.y > posBound)&&(transform.eulerAngles.y<oposite)){ dir = -1; } else if((transform.eulerAngles.y < negBound)&&(transform.eulerAngles.y>oposite)){ dir = 1; } // rotate object } this causes the opposite situation as indicated on the table. What am I missing here?

    Read the article

  • Unable to install gem "pg" on Ubuntu 12.10 (AMD64)

    - by Lynx_Eyes
    I've been (unsuccessfully) trying to install the "pg" gem on my ruby 1.9.3-p286 but nothing seems to work. I've already installed postgresql (9.1), libpq-dev and a few others like postgresql-server-dev-9.1. I've tried to pass the "with-pg-config" flag to the gem install but simply nothing seems to work. Every time I try to install the gem it outputs something like this: Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/lynux/.rvm/rubies/ruby-1.9.3-p286/bin/ruby extconf.rb checking for pg_config... yes Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... no checking for PQconnectdb() in -llibpq... no checking for PQconnectdb() in -lms/libpq... no Can't find the PostgreSQL client library (libpq) *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/lynux/.rvm/rubies/ruby-1.9.3-p286/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pqlib --without-pqlib --with-libpqlib --without-libpqlib --with-ms/libpqlib --without-ms/libpqlib Gem files will remain installed in /home/lynux/.rvm/gems/ruby-1.9.3-p286@phisiodata/gems/pg-0.14.1 for inspection. Results logged to /home/lynux/.rvm/gems/ruby-1.9.3-p286@phisiodata/gems/pg-0.14.1/ext/gem_make.out What am I doing wrong? Is there something else that I should do before trying to install the gem? Thank you in advance. [EDIT] Ok, so joelparkerhenderson's answer set me to think that there might me something wrong with paths and libraries and a went on digging a little bit further.. I've found this awesome post and it solved! Basically the problem lies with RVM. So, my problem is solved and for anyone out there that might suffer from the same thing, follow the link!

    Read the article

  • Per directory ignore in TextMate

    - by tig
    I love idea of TextMate that any directory opened in it is already a project. But sometimes I it would be good to ignore files for certain dir and I don't like idea of creating project file in that dir or remembering how I named project file in some special folder like ~/.tmproject. Is there some sort of plugin or something like this which will allow me to ignore files in dir? Perfect solution would be reading .gitignore file.

    Read the article

  • How to start a s3ql script automatically on boot?

    - by ks78
    I've been experimenting with s3ql on Ubuntu 10.04, using it to mount Amazon S3 buckets. However, I'd really like it to mount them automatically. Does anyone know how to do that? I've been working on a script, which works when its run from from the commandline, but for some reason I can't get it to run automatically on boot. Does anyone have any ideas? Here's my script: #! /bin/sh # /etc/init.d/s3ql # ### BEGIN INIT INFO # Provides: s3ql # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO case "$1" in start) # Redirect stdout and stderr into the system log DIR=$(mktemp -d) mkfifo "$DIR/LOG_FIFO" logger -t s3ql -p local0.info < "$DIR/LOG_FIFO" & exec > "$DIR/LOG_FIFO" exec 2>&1 rm -rf "$DIR" modprobe fuse fsck.s3ql --batch s3://mybucket exec mount.s3ql --allow-other s3://mybucket /mnt/s3fs ;; stop) umount.s3ql /mnt/s3fs ;; *) echo "Usage: /etc/init.d/s3ql{start|stop}" exit 1 ;; esac exit 0

    Read the article

  • Per directory ignore in TextMate

    - by tig
    I love idea of TextMate that any directory opened in it is already a project. But sometimes I it would be good to ignore files for certain dir and I don't like idea of creating project file in that dir or remembering how I named project file in some special folder like ~/.tmproject. Is there some sort of plugin or something like this which will allow me to ignore files in dir? Perfect solution would be reading .gitignore file.

    Read the article

  • Trying to delete a directory stored on a WIndows server, mounted on a mac

    - by AdamG
    I am trying to delete a directory stored on a Windows 2008 R2 server, mounted on a Mac as network home (10.8.5). The directory was created by Safari and stores temporary internet files. I need to be able to delete this folder on logout from a Mac bash script. The Terminal on Mac shows the directory as empty: 36W-FacRm-02:History lwickham$ cd /home/lwickham/Library/Caches/Metadata/Safari/History 36W-FacRm-02:History lwickham$ ls -al total 0 drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:24 . drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:28 .. However, on the Windows server it has a single 0kb file that doesn't start with a "." but yet is invisible to the Mac. E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History>dir Volume in drive E is FacultyUsers2 Volume Serial Number is 8C17-4EF3 Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History 11/08/2013 09:24 AM <DIR> . 11/08/2013 09:24 AM <DIR> .. 11/07/2013 04:28 PM 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct= j&q=&esrc=s&source=web&cd=6&ved=0CFsQFjAF&url=http%253A%252F%252Fwww.usbanklocat ions.com%252Fhsbc-bank-usa-96th-street-branch.html&ei=5vR7UtmXEPjfsATe0YCIBA&usg =AFQjCNF9ypKbpYbXRng00FY3W8Y6cF1Tiw&bvm=bv.56146854,d. 1 File(s) 0 bytes 2 Dir(s) 514,231,967,744 bytes free All my attempts to delete the dir from the Mac have failed: 36W-FacRm-02:History lwickham$ rm -fr /home/lwickham/Library/Caches/Metadata/Safari/History/* 36W-FacRm-02:History lwickham$ rm -frd /home/lwickham/Library/Caches/ rm: /home/lwickham/Library/Caches//Metadata/Safari/History: Directory not empty rm: /home/lwickham/Library/Caches//Metadata/Safari: Directory not empty rm: /home/lwickham/Library/Caches//Metadata: Directory not empty rm: /home/lwickham/Library/Caches/: Directory not empty

    Read the article

  • unique .htaccess question about mod_rewrite and RewriteCond

    - by Stephen
    I have a few rewrite rules like these RewriteRule ^dir/(.*)-something.html otherdir/file1.php?var1=val&var2=$1 [L,NC] RewriteRule ^dir/ otherdir/file2.php?var1=val [L,NC] dir/ is not a real directory. Everything above works as expected. However, the user is able to type anything like mysite.com/dir/asdfasdfasdfsdf And they are still redirected to file2.php. If the user types in just garbage I'd like to serve a 404 instead. I'm guessing I need a RewiteCond that will test for blank space after the slash and only then serve file2.php, but I'm unsure how to write it.

    Read the article

  • Can't set acl for afs even though i'm in the right group

    - by Torandi
    I've got a dir that i've lost controll over in an afs system. According to the system adminstrators my adminin subgroup (dsekt:admin) got rlidwka on the dir. I'm a member of this group (and i can list the members of the group and see my nick there) though I can't set the acl's for the dir. The pts: $pts membership dsekt:admin Members of dsekt:admin (id: -6813) are: /.../ taran And my klist. $>klist Credentials cache: FILE:/tmp/krb5cc_56782 Principal: [email protected] Both dsekt:admin and the dir is on the NADA.KTH.SE node.

    Read the article

  • Going to directory using bash variables doesn't work when directory names have spaces

    - by gsingh2011
    Let's say I want to store the following command in a variable cd "/cygdrive/c/Program Files/" So I do this dir="cd \"/cygdrive/c/Program Files/\"" That should store the command to navigate to the Program Files directory, so when I type $dir it takes me to that directory. To check that the quotations have been properly escaped, I type echo $dir which gives me cd "/cygdrive/c/Program Files/" So everything should be working fine. However, when I type, $dir I get bash: cd: "/cygdrive/c/Program: No such file or directory What am I doing wrong? I'm using Cygwin, but I assume this problem applies to bash in general.

    Read the article

  • php jpeg support

    - by Thomas
    Hi all, I have complied php with the below options './configure' '--with-config-file-path=/opt/apache/php/etc' '--with-config-file-scan-dir=/opt/apache/php/etc/php.d' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-shmop' '--enable-soap' '--enable-bcmath' '--disable-debug' '--enable-ftp' '--with-curl=/usr/include' '--with-regex=system' '--enable-inline-optimization' '--enable-magic-quotes' '--enable-mbstring' '--enable-wddx=shared' '--enable-xml' '--with-gd' '--with-gettext' '--with-mysql' '--with-zlib-dir=/usr/local/lib' '--enable-mbstring' '--prefix=/opt/apache/php' '--with-apxs2=/opt/apache/bin/apxs' '--with-zlib' '--with-openssl' '--with-freetype-dir=/usr/include/freetype2/freetype--with-jpeg-dir=/usr/lib/' but I have no jpeg support. Am I missing something? libjpeg and libjpeg-devel are installed Thanks

    Read the article

  • Recursively move files in sub-dirs to new sub-dirs of same name

    - by Gabriel
    I have a batch of files all ending with the same string, ie: *_ext.dat located in several sub-dirs along with several other files, in a given main dir. This is the structure: /main_dir/subdir1/file11_ext.dat /main_dir/subdir1/file12_ext.dat /main_dir/subdir1/file13_ext.dat /main_dir/subdir1/file14_other.dat /main_dir/subdir1/file15_other.dat /main_dir/subdir2/file21_ext.dat /main_dir/subdir2/file22_ext.dat /main_dir/subdir2/file23_ext.dat /main_dir/subdir2/file24_other.dat /main_dir/subdir2/file25_other.dat /main_dir/subdir3/file31_ext.dat /main_dir/subdir3/file32_ext.dat /main_dir/subdir3/file33_ext.dat /main_dir/subdir3/file34_other.dat /main_dir/subdir3/file35_other.dat I need to recursively move only the files ending in *_ext.dat into a new main dir, new_dir, respecting the sub-dir structure so the files will end up in an equivalent dir structure like this: /new_dir/subdir1/file11_ext.dat /new_dir/subdir1/file12_ext.dat /new_dir/subdir1/file13_ext.dat /new_dir/subdir2/file21_ext.dat /new_dir/subdir2/file22_ext.dat /new_dir/subdir2/file23_ext.dat /new_dir/subdir3/file31_ext.dat /new_dir/subdir3/file32_ext.dat /new_dir/subdir3/file33_ext.dat Because of this the command should also create those sub-dirs with their corresponding names. I know that with a line like this one: find . -name "*_ext.dat" -print0 | xargs -0 rm -rf I can delete all those files, but I don't know how to modify it to do what I need (or if it is even possible).

    Read the article

  • mv directory to overwrite another

    - by gbjbaanb
    I may be going bonkers here, but I'm trying to move a directory to a new location, overwriting the contents (on Linux, using bash). Everytime I try it, it responds with "mv: cannot move `./src' to a subdirectory of itself" eg. I have: /src /new/dir/src /$ mv src/ new/dir/ If I delete the destination dir, then it works. I know I can move the contents of the source dir to overwrite the destination, but I'd like to use the same command to overwrite the destination if it already exists, or move the source if it doesn't.

    Read the article

  • readlink: illegal option -- f

    - by Scott
    Recently the script was working fine, but from some days I'm receiving such message, while running the readlink -f "$0" command: readlink: illegal option -- f usage: readlink [-n] [file ...] I was running the following code to debug: #!/bin/sh DIR=`pwd` RLPATH=`which readlink` RLOUT=`readlink -f -- "${0}"` DIROUT=`dirname -- ${RLOUT}` echo "dir: ${DIR}" echo "path: ${PATH}" echo "path to readlink: ${RLPATH}" echo "readlink output: ${RLOUT}" echo "dirname output: ${DIROUT}" Output: # ./debug.sh readlink: illegal option -- f usage: readlink [-n] [file ...] usage: dirname string [...] dir: /home/svr path: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin path to readlink: /usr/bin/readlink readlink output: dirname output: What is wrong ?

    Read the article

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