i have hundreds of directories that have to be renamed. the directory structure is fairly uniform which makes the scripting a little simpler.
suppose i have many directories like this */*/*/*abc* (in other words i have similar directory names 3 dirs deep that all contain the pattern abc in... (8 Replies)
I need to split a file based on certain context inside the file. Is there a unix command that can do this? I have looked into split and csplit but it does not seem like those would work because I need to split this file based on certain text. The file has multiple records and I need to split this... (1 Reply)
Hi,
I have some ps files where I want to ectract/copy a certain number from and use that number to rename the ps file.
eg:
'file.ps' contains following text:
14 (09 01 932688 0)t
the text can be variable, the only fixed element is the '14 ('. The problem is that the fixed element can appear... (7 Replies)
Evening all. I'm having a terrible time with a script I've been working on for a few days now...
Say I have a text file named top10song.tm2, with the following in it:
kernkraft 400
Imagine
i kissed a girl
Thriller
animals
hallelujah
paint it black
psychosocial
Oi to the world... (14 Replies)
Hi,
I'm not very experienced in shell scripting and that's probably why I came across the following problem:
I do have several hundred pairs of text files (PF00x.spl and PF00x.shd) where the first file (PF00x.spl) needs to be renamed according a string that is included in the second file... (12 Replies)
I have a number of files in directories labeled like this:
/Data/tr_gray/tr_DTI/dti_FA.nii.gz
(the brackets here represent a range of number that the files are labeled with)
I need to rename each dti_FA.nii.gz file according to the name of the folder it resides in. For example, the file ... (3 Replies)
Hello,
I have a file ff.txt that looks as follows
*ABNA.txt
356
24
36
112
*AC24.txt
457
458
321
2
ABNA.txt and AC24.txt are the files in the folder named foo1. Based on the numbers in the ff.txt file, I want to extract the lines from the corresponding files in the foo1 folder and... (2 Replies)
I have files in the ABC_YYYYMMDD.zip format under a directory. Each zip file contains A text file in the ABC_YYYYMMDD.txt format.
I am trying to create a script that will Rename the zip files and their underlying text file replacing the datepart in them with .
For eg: in the case of... (1 Reply)
Hi,
I have a directory with a lot of files like this:
a.bam
b.bam
c.bam
I like to rename these files based on a list where the name of the files in the first column will be replasced by the names in the second column. Here is my list which is a tab-delimited text file:
a x
b y
c ... (4 Replies)
Hello!
New here although not completely new to Unix.
I wonder how I could rename files based on the data found in a simple textfile.
It goes like this:
I have 4 files
1 ldfgkkfjslkdfjsldkfjsf.wav
2 nndsdflksdjf.wav
3 sdflksjdf jjsdflsdfl.wav
4 dkadsdddd.wav
Textfile.txt looks like... (14 Replies)
Discussion started by: Oortone
14 Replies
LEARN ABOUT DEBIAN
ns_chmod
ns_file(3aolserver) AOLserver Built-In Commands ns_file(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_chmod, ns_cp, ns_cpfp, ns_ftruncate, ns_link, ns_mkdir, ns_rename, ns_rmdir, ns_symlink, ns_truncate, ns_unlink - File manipulation com-
mands
SYNOPSIS
ns_chmod option ?arg arg ...?
ns_cp option ?arg arg ...?
ns_cpfp option ?arg arg ...?
ns_ftruncate option ?arg arg ...?
ns_link option ?arg arg ...?
ns_mkdir option ?arg arg ...?
ns_rename option ?arg arg ...?
ns_rmdir option ?arg arg ...?
ns_symlink option ?arg arg ...?
ns_truncate option ?arg arg ...?
ns_unlink option ?arg arg ...?
_________________________________________________________________DESCRIPTION
ns_chmod filename mode
Change a file's access permissions. ns_chmod changes the specified file's permissions to mode, in the same manner as the Unix
chmod(1) command-line utility.
ns_cp -preserve file1 file2
Copy one file to another. ns_cp copies the contents of file1 to file2, just like the Unix "cp" command. The default directory is
the home directory for the server. If -preserve is specified, the copied file will retain the creation time, modification time,
owner, and mode of the original file, just like the Unix "cp -p" command.
ns_cpfp fileid1 fileid2 ?nbytes?
Copy a specified number of bytes from one file to another. ns_cpfp copies information from one file (fileid1) to another (fileid2).
If you specify a number of bytes in the nbytes argument, only the specified number of bytes will be copied. By default, the entire
file is copied.
ns_ftruncate fileid ?length?
Truncate an open file to a specified length. ns_ftruncate causes the open file specified by fileid to have a size of length bytes.
If length is not specified, it causes the file to have a size of zero bytes. The file must be open and be a regular file.
ns_link ?-nocomplain? filename1 filename2
Create a link. ns_link creates a link named filename2 that points to the file specified by filename1. If the link fails, a Tcl
error is generated, unless -nocomplain is specified.
ns_mkdir path
Create a directory. ns_mkdir creates the directory named PATH, just like the Unix mkdir command. By default, under Unix the direc-
tory is created with the file permissions set to 0755 (rwxr-xr-x.). These permissions can be modified by setting the umask parameter
for the server.
ns_rename file1 file2
Rename a file. ns_rename renames the first file (file1) to the file name specified by file2. Make sure that the files and the
directories in which the files exist are read/write accessible to the username that's running the AOLserver.
ns_rmdir path
Remove a directory. ns_rmdir removes the directory named path, just like the Unix rmdir command. The directory must already be
empty.
ns_unlink [-nocomplain] filename
Remove a file. ns_unlink attempts to remove the file filename. If -nocomplain is not passed in and the removal fails, a Tcl error
is generated.
ns_truncate filename ?length?
Truncate a file to a specified length. ns_truncate causes the file specified by filename to have a size of length bytes. If length
is not specified, it causes filename to have a size of zero bytes. The file must exist and be a regular file.
ns_unlink [-nocomplain] filename
Remove a file. ns_unlink attempts to remove the file filename. If -nocomplain is not passed in and the removal fails, a Tcl error
is generated.
SEE ALSO
ns_chmod, ns_cp, ns_cpfp, ns_ftruncate, ns_link, ns_mkdir, ns_rename, ns_rmdir, ns_symlink, ns_truncate, ns_unlink
KEYWORDS AOLserver 4.0 ns_file(3aolserver)