Ok I tried both of your suggestions and neither worked exactly. There were a couple of problems with
First, it tried to make a directory called ls. So I replace for file in 'ls' with for file in *.mat. Then it didn't work because it wouldn't let me create a directory with exactly the same name as an existing file name in the parent directory. So I modified it to the following which works almost perfectly.
However, the problem with this is that it makes the directories with the file extensions on them. For example it creates the directory test1.mat in the destination directory instead of just test1. How can i get rid of the .mat in the directory name.
Is there a way to create a directory in some remote location from a local location?
I understand that we can use 'rcp' to copy a local file to a remote location.
I am looking for a command in similar lines which lets us create directories in remote locations.
Could someone help? (5 Replies)
Hi Friends,
I am trying to move some files from one directory to another.
but if the destination directory doesnt exist then i have to create one and then move files to that.
For this i have to write a script.
please help.
thanks in advance
Veera (4 Replies)
hi all
i have a file with server id's and I need to create a directory corresponding to each server id listed in the text file.
eg:
id directory name
1 node_1
2 ... (6 Replies)
Is it possible to create a Filesystem with the mount point over an existing Directory, without loosing the data in the Directory?
eg:-
/u01 -> /pmmpd/u01 (Directory with soft link)
/pmmpd/u01 (Need to create this filesystem, without loosing data)
Thanks
TheDoc (0 Replies)
Is it possible in VI to do a global change but take the search patterns and the replacement patterns from an external file ?
I have cases where I can have 100,200 or 300+ global changes to do. All the new records are inside a file and I must VI a work file to change all of them.
Also, can... (1 Reply)
Hiiii,
here is my script--
BackupLocation="$OPTARG"
if ]; then
echo "Either option l or L should be given to $Programname"
echo "$Usage"
echo "$Programname is terminated"
... (1 Reply)
By the company winning business from another outsource provider, I've suddenly inherited towards 300 servers and all accounts are local.
One of the immediate tasks is to set up all the OS, DB, and app support staff on all of the servers operating systems. I've slapped together a crude script... (10 Replies)
Hi All,
I am facing a strange scenario. I upgraded my server version to new version of linux. After the when I create a directory it is created with . in the the permission . What is the reason and how to fix .
$ mkdir test
$ ls -l
total 0
drwxr-xr-x. 2 uk01 users 6 Dec 7 03:49 test
... (1 Reply)
i read here that linux provides no way to determine when a directory was created.
https://www.unix.com/shell-programming-and-scripting/157874-creation-date-directory.htmlI have a directory /home/andy/scripts that had a README file in it.
That file says
I put the script in that directory and... (3 Replies)
Discussion started by: drew77
3 Replies
LEARN ABOUT DEBIAN
dh_movefiles
DH_MOVEFILES(1) Debhelper DH_MOVEFILES(1)NAME
dh_movefiles - move files out of debian/tmp into subpackages
SYNOPSIS
dh_movefiles [debhelperoptions] [--sourcedir=dir] [-Xitem] file...]
DESCRIPTION
dh_movefiles is a debhelper program that is responsible for moving files out of debian/tmp or some other directory and into other package
build directories. This may be useful if your package has a Makefile that installs everything into debian/tmp, and you need to break that
up into subpackages.
Note: dh_install is a much better program, and you are recommended to use it instead of dh_movefiles.
FILES
debian/package.files
Lists the files to be moved into a package, separated by whitespace. The filenames listed should be relative to debian/tmp/. You can
also list directory names, and the whole directory will be moved.
OPTIONS --sourcedir=dir
Instead of moving files out of debian/tmp (the default), this option makes it move files out of some other directory. Since the entire
contents of the sourcedir is moved, specifying something like --sourcedir=/ is very unsafe, so to prevent mistakes, the sourcedir must
be a relative filename; it cannot begin with a `/'.
-Xitem, --exclude=item
Exclude files that contain item anywhere in their filename from being installed.
file ...
Lists files to move. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory
will be moved. It is an error to list files here unless you use -p, -i, or -a to tell dh_movefiles which subpackage to put them in.
NOTES
Note that files are always moved out of debian/tmp by default (even if you have instructed debhelper to use a compatibility level higher
than one, which does not otherwise use debian/tmp for anything at all). The idea behind this is that the package that is being built can be
told to install into debian/tmp, and then files can be moved by dh_movefiles from that directory. Any files or directories that remain are
ignored, and get deleted by dh_clean later.
SEE ALSO debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
9.20120909 2012-05-19 DH_MOVEFILES(1)