I am having trouble using cp and mkdir commands on a small script. The problem is I have spaces what I am trying to mkdir and then copy. Any suggestions on how I can solve this problem? I've tried searching online.
I've tried \" but that didn't help. Thanks in advance.
I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help.
echo $SH_VAR | command_line Syntax.
The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
I'm sitting here late at night, reading linux from scratch, and I come to this part:
http://lfs.osuosl.org/lfs/view/stable/chapter06/creatingdirs.html
my question to you, the all knowing unix.com'ers is this: what's the difference between using the install command as they do, and using the... (1 Reply)
Hi,
I look for a script to create 150 directories :
d000
d001
d002
...
...
d149
would you help me please ?
I think it would be
for i
mkdir d$i
Many thanks.
PS :
#uname -a
AIX fserver 3 5 0050691A4C00 (2 Replies)
Is there ant way to increase max number of folders in the directory from the 32766:
Problem UFS:
shell>mkdir mmm
mkdir: mmm: Too many links
But there are no links, just folders.
shell>ls | wc -l
32766 (3 Replies)
Hi,
I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is.
I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Dear,
I have the following script:
maak_backup ()
{
echo 'Maken van tijdelijke bestanden, even geduld aub.'
for i in /home/yannick/* ;
do
cp -r $i $i.bac
done
if ;
then
echo 'Backup map = OK!'
echo 'Bezig met kopiëren, even geduld... (9 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Do the procedure, which if there are 5 parameters then it creates 4 directories with names of 4 parameters, in... (2 Replies)
Hi, I used "mkdir job{0001..10}" do get directories. Now I want to create directories with a variable, for exemple "mkdir job{0001..$a}". When a=5 I get the directory "job{0001..5}". What have i to change to get job0001,...,job0005 :/
Thx for ur help :) (1 Reply)
hi linux expert
what is a difference between:
mkdir test and mkdir ./test
and also
if ( -e /test ) then and if ( -e ./test ) then
thanks in advance
Please use icode or code tags next time for your code and data (1 Reply)
Discussion started by: abdossamad2003a
1 Replies
LEARN ABOUT MINIX
mkdir
MKDIR(2) System Calls Manual MKDIR(2)NAME
mkdir - make a directory file
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int mkdir(const char *path, mode_t mode)
DESCRIPTION
Mkdir creates a new directory file with name path. The mode of the new file is initialized from mode. (The protection part of the mode is
modified by the process's mode mask; see umask(2)).
The directory's owner ID is set to the process's effective user ID. The directory's group ID is set to that of the parent directory in
which it is created.
The low-order 9 bits of mode are modified by the process's file mode creation mask: all bits set in the process's file mode creation mask
are cleared. See umask(2).
RETURN VALUE
A 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno.
ERRORS
Mkdir will fail and no directory will be created if:
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG] The path name exceeds PATH_MAX characters.
[ENOENT] A component of the path prefix does not exist.
[EACCES] Search permission is denied for a component of the path prefix.
[ELOOP] Too many symbolic links were encountered in translating the pathname. (Minix-vmd)
[EROFS] The named file resides on a read-only file system.
[EEXIST] The named file exists.
[ENOSPC] The directory in which the entry for the new directory is being placed cannot be extended because there is no space left on
the file system containing the directory.
[ENOSPC] The new directory cannot be created because there there is no space left on the file system that will contain the directory.
[ENOSPC] There are no free inodes on the file system on which the directory is being created.
[EIO] An I/O error occurred while making the directory entry or allocating the inode.
[EIO] An I/O error occurred while reading from or writing to the file system.
[EFAULT] Path points outside the process's allocated address space.
SEE ALSO chmod(2), stat(2), umask(2).
4.2 Berkeley Distribution August 26, 1985 MKDIR(2)