General :: Bash - Ksh - Etc - Mkdir Stopped ?
Feb 28, 2011
I have a problem with creating folders with parametr -p. I have script like: mkdir -p /dir1/dir2/dir3/dir4, but if for example /dir1/dir2 is a file, then mkdir is stoped. how to rewrite file dir2 to directory?
View 3 Replies
ADVERTISEMENT
Jun 26, 2010
I was to set up a cronjob that sends its output to a logfile, i want that log file to be unique. the easiest way to set this up would be to make the directory in the script, then output the command to that directory, they call that directory via is full path in cron (because cron only uses full path names.
This does not work
keep in mind the command "/bin/mkdir -p /tmp/pw_log/`date +20%y%m%d_%H%M%S`.log" works fine on the command line - but once I put it in the shell, it does not work.
View 3 Replies
View Related
Feb 5, 2010
I've written a program which creates a directory using the system call mkdir()
How can i execute 'mkdir -v' using this system call? is there another system call to include options?
View 2 Replies
View Related
Jul 19, 2010
What does the mkdir -p flag do? i.e the '-p' part?
View 1 Replies
View Related
May 25, 2010
How do I make a directory with the date in this format:
YYYYMM
201005
View 2 Replies
View Related
Apr 19, 2010
im trying to implements mercurial repositories using ssh access.The problem is that if a login via ssh with the user "userA" all file upload vi that user are created with the owner: userA:userA and i need to use the group of the parent directory... is that posible ?For example:
repos ( root:repo)
-> project1 ( root:repoPrj1 )
-> file1 ( userA:usearA ) -> here i want userA:repoPrj1
View 1 Replies
View Related
Sep 8, 2010
I just rebuilt my system from cd CentOS5.5
Went to make a dir and got this...
The command took a while to come back. I googled it but nothing came back.
Could this be hadw error? The drive is new. I was able to issue the command again and have it work.
View 2 Replies
View Related
May 30, 2010
The setup ( although dont trust anything I say ):
I'm working on an embedded system device using a NFS mounted rootfs ( as shared by my host ) , but I store large video content directly on the device's hdd in /data.
Device's hdd partition /dev/sda3 is ext3 fs mounted at /tmp/mnt/diska3 (rw), then I have a script create dirs like /tmp/mnt/diska3/data and /tmp/mnt/diska3/data/incoming, then symlink :
ln -s /tmp/mnt/diska3/data /data so that the /data appears like any other directory.
I can see /tmp/mnt/diska3/data/incoming. I did chmod -R a+w tmp to rule out permissions.
Running a subsequent script calls mkdir: mkdir -p /data/incoming/gui
BUT fails: mkdir: cannot create directory '/data/': No such file or directory
View 5 Replies
View Related
Aug 7, 2011
I cannot mkdir on an ancillary HDD
[Code].....
View 2 Replies
View Related
Jan 11, 2010
"You'll probably want to operate from inside your home directory. If your user is (for example) username, your home directory will be /home/username/. For the rest of this section we will assume you have downloaded your zip file to /home/username/src. If you do not have a src directory, you can create it with the following "mkdir" (make directory) command:"
Where do the commands go? I cant make it work in terminal. How do I get back to "home" from where i am now? example /home/mydesktop/. I am working in mydesktop. I have downloaded some packages that pkcon search will not find, but when I try to install them using "synaptic" it cant find the packages i dl. So I found this tutorial.
"So, we have our source package in /home/username/src/.
Change to the /home/username/src/ directory with the "cd" (change directory) command like so: cd /home/username/src/
but I dont know where to write the commands.
View 7 Replies
View Related
Feb 4, 2010
Code:
This won't work in a script but it WILL work on the commandline...
Here is my output when I try the script:
Code:
Also, what is the at the end of the path in the error?
View 3 Replies
View Related
Feb 3, 2011
For some reason my bash autocomplete stopped working. I get the error when I try to cd into a directory, pressing <tab> for autocomplete:
cd A-sh: <( compgen -d -- 'A' ): No such file or directory
Autocomplete works for the root user and for the other user on the machine, just not logged in as this user. The .bashrc file looks fine to me, and I didn't make any changes to it to even cause the bash autocomplete to stop working (as far as I know).
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
What else could cause autcomplete to stop working? I log in via ssh, btw.
View 11 Replies
View Related
Oct 20, 2010
Have a bash script which contains a line like this:
if [[ ${array[${last}]} =~ "screenpc.PRODUCTION.*" ]]
which WORKED as expected in bash 4.0.33 and now fails in 4.1.2
Instrumented the script to print the value of the left-hand side and it is exactly what is expected.
As noted above, this has been working fine until we installed Fedora 13 (kernel 2.6.33), and now it fails.
Tried setting shell 'extglob' to On with same results.
Did something change? Are there other shell/bash options that need to be set?this has the whole installation stopped!
View 10 Replies
View Related
Jun 16, 2010
I am a student studying computer science course.
Well, I am facing problem when doing lab questions.
I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).
I am required to use the /usr/local directory.
In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".
Look at my screenshot at [url].
View 9 Replies
View Related
Apr 9, 2011
How to write a mkdir with -p option. I am struggling for creating subfolders. the chdir() is not working and thus subdirectories can't be created.
Code:
View 1 Replies
View Related
Oct 20, 2010
On a ubuntu 9.10 server. The problem is that when I try to mkdir in /var/local/ it says th disk is full but running df -h outputs:
Code:
I cannot see what's eating up my space in /var.
View 9 Replies
View Related
Nov 29, 2010
I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:
Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END
[code]...
View 6 Replies
View Related
Jul 17, 2010
below are the details of my system. I have bash as my current shell, some really common commands aren't working.
Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])
Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$
[Code]....
View 13 Replies
View Related
Feb 19, 2010
I am working on a bash script which among its operations creates directories using the mkdir command. However, when the directory already exists mkdir mentions that in the command line output.
Is there any way I can make mkdir silently overwrite any existent directory? (no messages in the output). For the same price, could it be done with other commands such as cp or mv?
View 3 Replies
View Related
Oct 25, 2010
I am working on SUSE 9 Server in which I am trying to make folder transferdata under /opt folder but it is throwing an error mkdir: cannot create directory `transferdata': Permission denied
View 2 Replies
View Related
Jun 10, 2010
How can we fire a shell command like ls,./a.out automatically in kernel space via a kernel module ? i.e. replacement of system() function of user space into kernel space.We need to develop a kernel module which can fire some shell command let say "firefox [url]" automatically to open google automatically from module.
View 2 Replies
View Related
Apr 27, 2011
I'm having a bit of trouble understanding umask and mkdir in C++. In my program, I want to create a directory with the permissions 755.
If I do:-
Code:
The permissions come out all messed up.
But if I do:-
Code:
The permissions are set as expected.
I am having trouble understanding why umask(0); is needed, and what is the 'proper' way to use it so I can make my directory. From what I can understand from the man pages and everything, I need to set the umask in my program to allow it permission to make a directory with those permissions? And I don't get why umask(0); fixes it anyway!
View 1 Replies
View Related
Dec 3, 2010
What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.
View 3 Replies
View Related
Aug 25, 2010
I have a line of code from a csh script:Code:if ( ! -e TEST ) mkdir TESTit checks if the directory "TEST" exists and if it DOES exist then nothing happens, if it DOES NOT exist then directory TEST will be made. Now I want to use this in a sh (or bash) script. Does anybody know the equivalent of the line above for sh?
View 5 Replies
View Related
Jun 21, 2011
I get the following error whenever I launch bash:
Code:
mkdir: cannot create directory `/dev/cgroup/cpu/user/5900': No such file or directory
bash: /dev/cgroup/cpu/user/5900/tasks: No such file or directory
bash: /dev/cgroup/cpu/user/5900/notify_on_release: No such file or directory
It seems like it's probably from this part of .bashrc:
[Code]...
What does this code do, why, and what's causing it to go wrong?
View 7 Replies
View Related
Apr 8, 2011
How can I resume a stopped job in Linux? I was using emacs and accidentally hit ctrl-z which blasted me back to the console. I can see it when I type 'jobs'
[*****]$ jobs
[1]+ Stopped
emacs test_queue.cpp
View 3 Replies
View Related
Aug 6, 2010
Is there possibility to restart stopped job from another terminal? I know this works with screen but is there way how to do without it?
I was trying to achieve it by sending signals with kill:
Code:
kill -s SIGSTOP $PID
kill -s SIGCONT $PID
but this keeps job on the original terminal. (I did the test with top.)
View 6 Replies
View Related
May 17, 2010
I have the latest drivers installed from ati, everything worked fine recently but now suddenly no games will run. I can access the Catalyst control centre, so it's not like my drivers got accidentally removed.
i get this error via terminal on any game i try to run, warsow, 0 a.d. etc
Quote:
********************
ERROR: Failed to load libGL.so.1
********************
Error: Failed to load libGL.so.1
I am thinking somehow a certain library i needed got removed?
View 2 Replies
View Related
Mar 18, 2011
i have used ubuntu 10.10 for some time i deleted the partition thats with linux in it when i restarted the system "grub rescue >"is the only one i was stopped at i cant enter my windows os
View 1 Replies
View Related
Jan 3, 2011
I have a laptop running Ubuntu 10.04 w/ wireless connection to desktop running Windows 7. I had it set up so I could execute a script to send a wakeonlan to the desktop. It worked fine for several weeks, but all of a sudden it stopped working. I've checked my script and it still looks good as far as I can tell. (I'm not that adept at script writing, so I wouldn't necessarily recognize a problem.) I've also checked the Windows machine to make sure the network adapter still is set to allow wake-on-lan.
BTW: my wake up script is as follows:
#!/bin/bash
wakeonlan xx:xx:xx:xx:xx:xx
Where the x's replace my actual MAC address.
View 3 Replies
View Related