Command Mkdir Error Invalid Argument
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies mkdir() invalid argument laravel of this site About Us Learn more about Stack Overflow the company
Mkdir Cannot Create Directory Invalid Argument
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges linux mkdir invalid argument Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: chmod Sign up PHP mkdir - Why is this an invalid argument? up vote 3 down vote favorite I wanted to experiment with creating directories titled with the date and current time. I know I can use the php time() function, but that is hard for me to read. Why can't I create a directory named 06-11-2014 11:37:04 or so? The php mkdir function is giving me an invalid argument when I try to use this format. php code php date mkdir share|improve this question edited Jun 11 '14 at 17:53 asked Jun 11 '14 at 17:38 wheatfairies 123213 4 Because of 077 use 0777; you forgot a 7. Better yet, use 0755 it's safer. –Fred -ii- Jun 11 '14 at 17:38 @Fred-ii- Hm no luck with 0777 or 0755, still getting invalid argument. –wheatfairies Jun 11 '14 at 17:41 2 Most filesystems won't allow colons in a file or directory name. –mifi79 Jun 11 '14 at 17:43 add a comment| 2 Answers 2 active oldest votes up vote 6 down vote accepted The colons in the date are messing it up. Your best bet is to use a format like this: $newdate = date("m-d-Y H_i_s"); share|improve this answer answered Jun 11 '14 at 17:40 Gloomwind 1213 That was it! I will accept your answer when I can. My filesystem doesn't allow colons in the directory title. –wheatfairies Jun 11 '14 at 17:44
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it http://stackoverflow.com/questions/24169206/php-mkdir-why-is-this-an-invalid-argument works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Don't understand following error: 'mkdir: invalid option — '/' up vote 1 down vote favorite I'm following a tutorial in a book and I'm tryin to install Oracle JDK 8. I've opened a terminal and entered the following command after the dollar http://askubuntu.com/questions/485657/dont-understand-following-error-mkdir-invalid-option prompt: sudo mkdir -p/usr/lib/jvm/ However, it's throwing me the following error: mkdir: invalid option -- '/' What am I doing wrong? command-line share|improve this question edited Jun 20 '14 at 21:02 Lucio 8,3091761114 asked Jun 19 '14 at 20:38 Jon295087 3302511 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted You should write with a space after the option e before the directory name sudo mkdir -p /usr/lib/jvm/ Some words about the options and the use of the space. In general the use of the space after the option depends from the command and the option that you intend to use. Each time you have to read the synopsis of the command. In this case you can use man mkdir. SYNOPSIS mkdir [OPTION]... DIRECTORY... DESCRIPTION ... -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask -p, --parents no error if existing, make parent directories as needed ... If the option is written with a space you have to use the space between option and option_argument. If it is not present you have no
Support Search GitHub This repository Watch 2,910 Star 35,598 Fork 10,467 docker/docker Code Issues 1,796 Pull requests 148 https://github.com/docker/docker/issues/12488 Projects 0 Wiki Pulse Graphs New issue Overlay FS "invalid argument" issues with Centos 7 #12488 Closed stevendborrelli opened this Issue Apr 17, 2015 · 4 comments https://bugs.php.net/bug.php?id=39485 Projects None yet Labels area/storage/overlay kind/bug Milestone No milestone Assignees No one assigned 4 participants stevendborrelli commented Apr 17, 2015 Trying the tech preview of Olverlay FS on invalid argument Centos 7.1. About half the containers I try to run end up having this issue: $docker run -it ubuntu /bin/bash FATA[0000] Error response from daemon: mkdir /var/lib/docker/overlay/36de2cb1cd7cec0f4ca96550a8829341d0f3ad4d711bc6b484038f15b27d0bc7-init/merged/dev/shm: invalid argument $docker info Containers: 10 Images: 65 Storage Driver: overlay Backing Filesystem: extfs Execution Driver: native-0.2 Kernel Version: 3.10.0-229.1.2.el7.x86_64 Operating System: CentOS Linux 7 (Core) CPUs: 2 Total command mkdir error Memory: 3.703 GiB Name: drone-01.novalocal ID: PKLX:QAOU:XUF2:CPKK:5DEN:LQYH:HSVO:XTGQ:APAF:3PWM:G5U5:U rpm -q docker docker-1.5.0-28.el7.centos.x86_64 stevendborrelli referenced this issue in CiscoCloud/mantl Apr 17, 2015 Closed Move Docker to overlayfs storage backend #180 stevendborrelli commented Apr 17, 2015 Opened a bug with Centos: http://bugs.centos.org/view.php?id=8493 thaJeztah added /system/overlay kind/bug labels Apr 19, 2015 etehtsea commented May 22, 2015 deleted stevendborrelli commented May 22, 2015 @etehtsea it was added to the RHEL/Centos 7.1 kernel as a technology preview: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.1_Release_Notes/chap-Red_Hat_Enterprise_Linux-7.1_Release_Notes-File_Systems.html sonots referenced this issue in drone/drone Jul 11, 2015 Closed Builds take long time to start #271 calavera commented Jul 16, 2015 I believe this issue is duplicated, please check #10294. I'm going to close it, but feel free to reopen it that's not correct. calavera closed this Jul 16, 2015 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this ti
Modified: 2013-02-18 00:33 UTC Votes:5 Avg. Score:2.6 ± 0.8 Reproduced:3 of 3 (100.0%) Same Version:2 (66.7%) Same OS:3 (100.0%) From: v1d4l0k4 at gmail dot com Assigned: Status: No Feedback Package: *Directory/Filesystem functions PHP Version: 5.2.0 OS: Windows XP (Win32 only) Private report: No CVE-ID: View Add Comment Developer Edit Have you experienced this issue? yes no don't know Rate the importance of this bug to you: high low Are you using the same PHP version? yes no Are you using the same operating system? yes no [2006-11-13 04:29 UTC] v1d4l0k4 at gmail dot com Description: ------------ The 'mkdir' function doesn't function correctly on Windows when the pathname contain space(s) on the final. PHP returns a warning, and the directory isn't created: Warning: mkdir() [function.mkdir]: Invalid argument in X on line Y Temporary fix: use trim() on the pathname Besides, if the pathname contain space(s) on the start, the directory is created when couldn't even so (in accordance with the behavior of Windows Explorer). Reproduce code: --------------- Expected result: ---------------- Actual result: -------------- Patches Add a PatchPull Requests Add a Pull RequestHistoryAllCommentsChangesGit/SVN commitsRelated reports [2006-11-21 21:03 UTC] tony2001@php.net Cannot reproduce: C:\>php -r "var_dump(mkdir('dirname '));" bool(true) [2006-11-29 01:00 UTC] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2010-07-14 03:50 UTC] felipe@php.net -Status: No Feedback +Status: Feedback [2010-07-14 03:50 UTC] felipe@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: ht