Within a BASH environment, I need to search through a filesystem looking for the last subdirectory. Once the last subdirectory of the filesystem is found, I need to create another directory within it:
Basic example: I attempted to perform searches for this scenario within this section, but couldn't find a resolution. Your help would be greatly appreciated.
Hi!
I am a user of a workstation. I have got my own previlages on my system. Still I would like to have a security for my data.
Can I set password or write a script that the entry to a particular subdirectiry is restricted?:confused: (1 Reply)
I am trying to copy some files from one location to another and I need to write a script to move all the files and the subdirectories to the new location (both unix), but excluding the temp directory.
i.e., I want to avoid copying my temp subdirectories during the process of copying other files... (3 Replies)
I am trying to reformat data from one private directory and reformat it and move it to a public one, but i only want to get directories that have not already been moved to the public directory. Here's what i'm working with
Dir1 contains folders for each named with timestamp
20090320081302... (2 Replies)
I need to remove subdirectories that are empty and I've not done this before. First I am going through the files to remove old records. Then if the directory is empty I want to delete it. There are files in /direcotry/images/fs* - 0-9 and a-z The fs* directories need to stay, but any directories... (4 Replies)
Hi,
I want to list all the directory and subdirectories under any directory.
For eg. i am in a directory called A and want to check all directories under A.
Output should be as below.
/A
/A/a1
/A/a1/a2
/A/b1
/A/c1/c2
A,a1,a2,b1,c1 and c2 all are directories.Just for Eg.
Please... (7 Replies)
Hi, I have a problem I am trying to solve with bash.
I need to search in a file system (data base) with hundreds of directories and thousands of subdirectories and millions of files. The files have a specific format with a header that gives the properties. Directories are organized so... (1 Reply)
I am trying to find all DAT files in a subdirectory named IN. I do not know the entire path.
For example: /stage/<?>/<?>/IN/file.DAT
I am using the find command without success:
find /stage -name IN -a -name '*.DAT' -print
What is the correct logic and syntax? Thank you for the help. (5 Replies)
Ok. Just getting back into PERL and probably (or most definitely) making a mountain out of a mole hill.
I'm trying to see if a subdirectory exists, and if not, print the slightly modified path of the missing sub to a file. Sounds simple enough. Well here is my elaborate code. Save the... (2 Replies)
I have a directory which has a collection of directories. I want to transfer all directories starting with `a` through `e` to the directory `ae`. What would be the command to achieve this? (0 Replies)
Hi,
How can i traverse to the last subfolder in all the directories.
eg:
i have the below folders structure
f1/sf1/r1
f2/sf2/r2
f3/sf3/r3/r4
i need to move to the last directory in each directory.
Can anyone tell me a solution for this?
I saw an example that does that.
find . -type... (2 Replies)
Discussion started by: Little
2 Replies
LEARN ABOUT OSF1
mvdir
mvdir(1) General Commands Manual mvdir(1)NAME
mvdir - Moves (renames) a directory
SYNOPSIS
mvdir directory1 directory2
DESCRIPTION
The mvdir command renames directories within a file system. To use mvdir, you must have write permission to directory1 and directory2 and
to the parent directories of directory1 and directory2. The directory1 argument must name an existing directory. If directory2 does not
exist, directory1 is moved to directory2. If directory2 exists, directory1 becomes a subdirectory of directory2. directory2 cannot be a
subdirectory of directory1.
Directories cannot be moved across file systems.
You can also rename a directory with the mv command.
NOTES
This command was made obsolete by the mv command.
EXAMPLES
To rename or move a directory to another location, enter: mvdir appendixes manual
If manual does not exist, then this renames the directory appendixes to manual.
If a directory named manual already exists, this moves appendixes and its contents to manual/appendixes. In other words, appendixes
becomes a subdirectory of manual.
SEE ALSO
Commands: mkdir(1), mv(1)
Functions: rename(2)mvdir(1)