10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
so i have a file system:
/data/projects
in this file system, there's about 300 files. on all files in this directory, i'm running:
egrep -r 'Customer.*Processed' /data/projects/*
is there an efficient (fast) awk way of searching through each file in the directory and providing an... (9 Replies)
Discussion started by: SkySmart
9 Replies
2. Shell Programming and Scripting
Hello,
I would like to rename all available files in a directory from Filename to Filename_Normal.
I tried to use below script but it is giving some error:
#!/bin/sh
for i in `ls`
do
echo Changing $i
mv $i $i_Normal
done
Error received:
Usage: mv src target
or: mv ... (10 Replies)
Discussion started by: manishdivs
10 Replies
3. UNIX for Dummies Questions & Answers
Hey Guys,
I have directory with thousands of files, I need to copy only march data.
can any one please Help..........
Thanks,
Uttam N (4 Replies)
Discussion started by: Uttamnsd
4 Replies
4. Shell Programming and Scripting
I want to get the latest files from multiple directories, d1, d2,d3 and d4 under the parent dierectoy d.
can anyone help out with this?
thx (3 Replies)
Discussion started by: shyork2001
3 Replies
5. Shell Programming and Scripting
Hi everyone!!
I have a database table, which has file_name as one of its fields.
Example:
File_ID File_Name Directory Size
0001 UNO_1232 /apps/opt 234
0002 UNO_1234 /apps/opt 788
0003 UNO_1235 /apps/opt 897
0004 UNO_1236 /apps/opt 568
I have to... (3 Replies)
Discussion started by: ss3944
3 Replies
6. UNIX for Dummies Questions & Answers
So I am not sure if this should go in the shell forum or in the beginners. It is my first time posting on these forums.
I have a directory, main_dir lets say, with multiple sub directories (one_dir through onehundred_dir for example) and in each sub directory there is a test.txt. How would one... (2 Replies)
Discussion started by: robotsbite
2 Replies
7. Shell Programming and Scripting
Hi,
i have say 100 files in a directory.
file1.log
file2.log
file3.log
file4.log
file5.log
file6.log
...
...
...
file99.log
file100.log
=========
I need to create another file which contains the list of al these log files.
each file should contain only 10 log file names.
it shud... (4 Replies)
Discussion started by: robinbannis
4 Replies
8. Shell Programming and Scripting
Hi there Gurus,
I have the following ftp script:
$ more ftp_dump_arch4.sh
#! /usr/bin/ksh
# Constant variables
HOST='xx.xx.xx.xx'
USER='user'
PASSWD='password'
dir='/export/file'
ftp_log='/tmp'
ftp -n $HOST > $ftp_log/ftp.log << END
user $USER $PASSWD
verbose
lcd $dir
bin (3 Replies)
Discussion started by: lweegp
3 Replies
9. Shell Programming and Scripting
Hi Friends,
My goal is to copy 1000 of files of same filesize simultaneously to a directory. i.e i do multiple copies into a same directory. What i feel here is, at some 1000th iteration, few transfers ends in advance before some transfers start. I need to get synchronized file transfers so that... (1 Reply)
Discussion started by: amio
1 Replies
10. UNIX for Dummies Questions & Answers
Good day all.
I want to unzip multiple files in a directory. Suppose there are two files:
test.txt.zip and test1.txt.zip
Using this command:
unzip -o -P test*.zip
results in the unzipping of the first file not second.
It gives this error:
Archive: test.txt.zip
caution: filename not... (2 Replies)
Discussion started by: er_ashu
2 Replies
rmdir(2) System Calls Manual rmdir(2)
NAME
rmdir() - remove a directory file
SYNOPSIS
DESCRIPTION
The system call removes a directory file whose name is given by path. The directory must be empty (except for the files and before it can
be removed.
RETURN VALUE
returns the following values:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to one of the following values.
[EACCES] A component of the path prefix denies search permission.
[EACCES] Write permission is denied on the directory containing the link to be removed.
[EACCES] The process does not have read/write access permission to the parent directory.
[EBUSY] The directory to be removed is the mount point for a mounted file system.
[EBUSY] The path is the current working directory.
[EEXIST] The named directory is not empty. It contains files other than and
[EFAULT] path points outside the process's allocated address space. The reliable detection of this error is implementation-
dependent.
[ELOOP] Too many symbolic links were encountered in translating the path name.
[ENAMETOOLONG] The length of the specified path name exceeds bytes, or the length of a component of the path name exceeds bytes
while is in effect.
[ENOENT] The named file does not exist.
[ENOTDIR] A component of the path is not a directory.
[EPERM] The directory containing the directory to be removed has the sticky bit set and neither the containing directory nor
the directory to be removed are owned by the effective user ID.
[EROFS] The directory entry to be removed resides on a read-only file system.
AUTHOR
was developed by the University of California, Berkeley and HP.
SEE ALSO
mkdir(2), unlink(2), remove(3C), privileges(5).
STANDARDS CONFORMANCE
rmdir(2)