07-25-2011
You added a preceding slash (/) to the directory when you tried to cd to it. The slash assumes it is at root (also /). If you created the directory anywhere but /, say /root, then you can't get there by the command you gave. You need to understand the concept of relative paths as compared to absolute paths.
This User Gave Thanks to mark54g For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
The message is:
#mkdir /home/ade
mkdir:Failed to make directory "/home/ade",Operation not applicable.
What's the problem? :mad: (3 Replies)
Discussion started by: new_hand
3 Replies
2. Shell Programming and Scripting
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)
Discussion started by: big123456
2 Replies
3. UNIX for Advanced & Expert Users
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)
Discussion started by: mirusnet
3 Replies
4. Shell Programming and Scripting
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.
while read linefile
do
echo mkdir -p $CPP$linefile | cut -d / -f 1-5,8-12
... (10 Replies)
Discussion started by: imagiro1
10 Replies
5. UNIX for Dummies Questions & Answers
hi..
i want to know how mkdir command make directory in linux....?? (2 Replies)
Discussion started by: rinkugarg
2 Replies
6. Shell Programming and Scripting
Hi, please help me with this small script
#!/bin/sh
curdir=`pwd`
n20=$curdir'/n20/'
msat=$curdir'/n20/msat/'
if
then
mkdir $n20
fi
if
then
mkdir $msat
fi
for a in 30 40 50 60 70 80
do (4 Replies)
Discussion started by: Dark2Bright
4 Replies
7. Shell Programming and Scripting
Hi, Unix Gurus,
- I have a simple question, I need create multiple directory. I use
mkdir {dir1, dir2, dir3)
I got one directory as
{dir1, dir2, dir3}
I searched @ google, I got answer as above code.:wall::confused:
Anybody has any idea
Thanks in advance
---------- Post updated... (3 Replies)
Discussion started by: ken002
3 Replies
8. Homework & Coursework Questions
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)
Discussion started by: bolones
2 Replies
9. UNIX for Beginners Questions & Answers
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
10. Shell Programming and Scripting
Importing images from a camera (or two).
I sort by date (1901 this month).
Currently (failing)
if ]
then
echo "Found Panasonic G9X"
#echo "List files on camera"
#ls ${pana}/*
. chxdir.sh ${photos}/$mn
I want to change directory to a fixed base ($photos)/$mn... (10 Replies)
Discussion started by: dpawson
10 Replies
LEARN ABOUT MOJAVE
chflags
CHFLAGS(1) BSD General Commands Manual CHFLAGS(1)
NAME
chflags -- change file flags
SYNOPSIS
chflags [-fhv] [-R [-H | -L | -P]] flags file ...
DESCRIPTION
The chflags utility modifies the file flags of the listed files as specified by the flags operand.
The options are as follows:
-f Do not display a diagnostic message if chflags could not modify the flags for file, nor modify the exit status to reflect such fail-
ures.
-H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal
are not followed.)
-h If the file is a symbolic link, change the file flags of the link itself rather than the file to which it points.
-L If the -R option is specified, all symbolic links are followed.
-P If the -R option is specified, no symbolic links are followed. This is the default.
-R Change the file flags for the file hierarchies rooted in the files instead of just the files themselves.
-v Cause chflags to be verbose, showing filenames as the flags are modified. If the -v option is specified more than once, the old and
new flags of the file will also be printed, in octal notation.
The flags are specified as an octal number or a comma separated list of keywords. The following keywords are currently defined:
arch, archived
set the archived flag (super-user only)
opaque set the opaque flag (owner or super-user only). [Directory is opaque when viewed through a union mount]
nodump set the nodump flag (owner or super-user only)
sappnd, sappend
set the system append-only flag (super-user only)
schg, schange, simmutable
set the system immutable flag (super-user only)
uappnd, uappend
set the user append-only flag (owner or super-user only)
uchg, uchange, uimmutable
set the user immutable flag (owner or super-user only)
hidden set the hidden flag [Hide item from GUI]
As discussed in chflags(2), the sappnd and schg flags may only be unset when the system is in single-user mode.
Putting the letters ``no'' before or removing the letters ``no'' from a keyword causes the flag to be cleared. For example:
nouchg clear the user immutable flag (owner or super-user only)
dump clear the nodump flag (owner or super-user only)
Unless the -H or -L options are given, chflags on a symbolic link always succeeds and has no effect. The -H, -L and -P options are ignored
unless the -R option is specified. In addition, these options override each other and the command's actions are determined by the last one
specified.
You can use "ls -lO" to see the flags of existing files.
EXIT STATUS
The chflags utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
ls(1), chflags(2), stat(2), fts(3), symlink(7)
HISTORY
The chflags command first appeared in 4.4BSD.
BUGS
Only a limited number of utilities are chflags aware. Some of these tools include ls(1), cp(1), find(1), install(1), dump(8), and
restore(8). In particular a tool which is not currently chflags aware is the pax(1) utility.
BSD
March 3, 2006 BSD