Hi, Any command or means to delete a director which is not empty
rmdir or similar
iam using Sun Solaries 2.6 :confused:
I have many full directories with subdirectories and I can not go on emptying them all (5 Replies)
Hi I need to write a shell script which basically searches for all the empty files within the directory structure, lists them before asking the user to confirm if they would like to delete them. If the user deletes the file then a notice would appear confirming the file is deleted.
I've be... (5 Replies)
I know this one was answered before in forum below -
https://www.unix.com/unix-dummies-questions-answers/58210-removing-empty-folders-using-find-command.html
But that one is closed & I have a question so here it goes.
I want to delete all 2006 files. Now if along with the files, if the... (2 Replies)
Hello:
I searched here for "vi -c" but found no hits.
How can I use vi -c to remove ALL empty lines, regardless of how many?
I tried
<code>
vi -c ":g/^$/d | wq" filename
</code>
but I have to run it several times.
This is NOT homework. :)
Thanks for your time. (3 Replies)
Hi all,
I'm trying to remove when this condition is met: an empty and the next one
I'm using this command:
sed '/^$/N; s/&//' file
Which searches for an empty line, N attaches it to the next line, and substituing the combination with nothing.... but it is not working.
What I'm missing... (1 Reply)
Hi all !
I'm sure it is a basic question but I didn't find any threads that fit my need.
How to remove empty fields with awk?
Or in other words, how to shift all the fields after an empty field on the left?
input:
1|2||3|4|5||6
wanted:
1|2|3|4|5|6
I tried:
awk '{for(i=1; i<=NF;... (7 Replies)
Hello:
Is there a simple way to remove empty records of FASTA format file?
A FASTA format consists of two parts: header and sequence (for non-biologist, Wiki for details of course!). The header always start with ">" for the name of the sequence. The header must be in this ONLY single line.... (9 Replies)
Hi gurus,
I have a script which works fine.
https://www.unix.com/shell-programming-and-scripting/239347-how-pass-string-into-sql-query.html
while read p
do
&& para="'${p}'" || para="${para},'${p}'"
done < filePlease use code tags as required by forum rules!
a few days... (6 Replies)
how to remove empty files tried below command its remove only zero bytes not empty file which is greater then zero byte.
for x in *
do
if
then
rm $x
fi
done (8 Replies)
Discussion started by: Kalia
8 Replies
LEARN ABOUT HPUX
rmdir
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)