Perhaps something like the following:
This approach is not at all efficient. It constantly spawns subshells. But it is succinct since the changes to the current working directory are not seen by parent shells.
The script takes two arguments. The first is mandatory, the number of levels (which is also the number of directories per level). The second is optional, the starting point for directory creation (defaults to the current directory).
The jot can be replaced with seq or with some other facility that your shell may provide for creating a list from a range for the for-loop.
Also, in my earlier calculations, I underestimated the number of directories created. Yes. Those estimates were actually low. The number of directories is not n^n, but n + n^2 + n^3 + ... + n^n.
I am in a fix.......
I have to write a backup script to backup say Folder A.
Folder A contains n folders 1,2 ,3 .....n.
my script should copy A without folder 2 & 3.
Is there anyway I can do it without writing individual copy commands????
Please help.... (1 Reply)
I am in a fix.......
I have to write a backup script to backup say Folder A.
Folder A contains n folders 1,2 ,3 .....n.
my script should copy A without folder 2 & 3.
Is there anyway I can do it without writing individual copy commands????
Please help.... (5 Replies)
Hello,
I'm new to unix and I have to rename all folder fron the current folder from a name like "xx - Name of the Folder" to "Name of the Folder - xx".
xx is a number ...
Can somebody, please, help?
Thank you! (6 Replies)
hello everybody,
i would like to hide visibility of the folders , i.e. not to giving any physically visibility to any users . Is there any way to do it other than changing the permission and adding "." post folder name .
by changing the permission , we cann't do any activity , but have... (1 Reply)
Hello again,
A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x.
I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
I have a peculiar problem.
I have a particular directory with the following characteristics:
-bash-3.00# ls -lah
total 18
drwxr-x--- 7 gandalf shire 512 jul 3 07:20 .
drwxr-x--- 11 gandalf shire 512 mai 10 2010 ..
drwxr-xr-x 6 gandalf shire 3,0K jul 24 19:25 brasdeff
drwxr-xr-x... (9 Replies)
I have a folder like this
ls input1
dir1 dir2 dir3 file1 file2 file3
dir1, dir2 and dir3 are sub-folders inside the folder input1
ls input2
dir1 dir2 dir3 file1 file2 file3
My dir1 in input1 folder has files f1, f2, f3 and f4.
My dir1 in input2 folder has file f4 and f5.
... (3 Replies)
Hi
Can i archive folder and folders in with the tar command
My files are located in subfolders
Eg: Folder1/Folder1_1/*.pdf
Folder1/Folder1_2/*.pdf
Folder1/Folder1_3/*.pdf
so i would like to tar all the files in Folder1_1 and Folder1_2 only not Folder1_3 that should be done next... (2 Replies)
Hi Experts,
Below is my shell script and it will move the files older than 90 days to archive mount. Now my new requirement is , I need to move some of the directory files older than 365 days. How can I achieve this.
Simply I have
DIR1
DIR2
DIR3
DIR4
I need to exclude DIR 2 and DIR 2... (5 Replies)
Hi,
So i know we use cp -r as a basic to copy folders/files.
I would like this BUT i would like to show the output of the files being copied.
With the amazing knowledge i have i have gone as far as this:
1) find source/* -exec cp -r {} target/ \;
2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
LEARN ABOUT DEBIAN
xsetfontpath
XSetFontPath(3) XLIB FUNCTIONS XSetFontPath(3)NAME
XSetFontPath, XGetFontPath, XFreeFontPath - set, get, or free the font search path
SYNTAX
int XSetFontPath(Display *display, char **directories, int ndirs);
char **XGetFontPath(Display *display, int *npaths_return);
int XFreeFontPath(char **list);
ARGUMENTS
directories
Specifies the directory path used to look for a font. Setting the path to the empty list restores the default path defined for
the X server.
display Specifies the connection to the X server.
list Specifies the array of strings you want to free.
ndirs Specifies the number of directories in the path.
npaths_return
Returns the number of strings in the font path array.
DESCRIPTION
The XSetFontPath function defines the directory search path for font lookup. There is only one search path per X server, not one per
client. The encoding and interpretation of the strings are implementation-dependent, but typically they specify directories or font
servers to be searched in the order listed. An X server is permitted to cache font information internally; for example, it might cache an
entire font from a file and not check on subsequent opens of that font to see if the underlying font file has changed. However, when the
font path is changed, the X server is guaranteed to flush all cached information about fonts for which there currently are no explicit
resource IDs allocated. The meaning of an error from this request is implementation-dependent.
XSetFontPath can generate a BadValue error.
The XGetFontPath function allocates and returns an array of strings containing the search path. The contents of these strings are imple-
mentation-dependent and are not intended to be interpreted by client applications. When it is no longer needed, the data in the font path
should be freed by using XFreeFontPath.
The XFreeFontPath function frees the data allocated by XGetFontPath.
DIAGNOSTICS
BadValue Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argu-
ment, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this
error.
SEE ALSO XListFont(3), XLoadFonts(3)
Xlib - C Language X Interface
X Version 11 libX11 1.5.0 XSetFontPath(3)