05-11-2008
Quote:
Originally Posted by
videsh77
In our directory there are too many files, & if I try to execute mv *.gz or rm *.l command it fails, providing error string as - 'arg list too long'. This doesnt happen always, is there any way we know, limit on the rm & mv command so we can take care of this failure in future executions ?
Hey,
I have created 100 directories and deleted them using rm -r *.abc
It works.
I dont think there is some kind of limitations to remove directories.
TO REMOVE DIRECTORIES recursive "-r" is to be used when give rm command.
Otherwise please tell how many sub directories you have under the main directory, then i can simulate the situation and could give you some solutions.
Thanks.
Varun
9 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hi All,
Is there any way to use mv command and
that should apply ACL on the moved files that is already set in distination location
This mv command is running in a solaris system. File system is NFS.
Problem I am facing : Currently mv command removes ACL from moved files
and also it... (0 Replies)
Discussion started by: Tlogine
0 Replies
2. Shell Programming and Scripting
Hi,
I am using /bin/sh. I want to display the stdout and stderr on the terminal as well as save it in a file, so I'm using this command.
gmake all 2>&1 | tee log
But even if gmake fails, it's always giving 0 as exit status, i suppose because of tee.
# false 2>&1 | tee Log
# echo $?
0... (2 Replies)
Discussion started by: anand_bh
2 Replies
3. Shell Programming and Scripting
Hi,
I need command to display files with full path and date of files where are generated at every 5hrs in a folder.
eg:
/u01/app/test/orjthsd_1_1 Sun May 10 19:03:26 2009
/u01/app/test/weoiusd_1_1 Sun May 10 21:00:26 2009
thanks
saha (3 Replies)
Discussion started by: saha
3 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am very new to unix and to this forum.Suggest me a solution in fixing the below issue.
Actually ia m executing java program through script.
The command is like
java pgm &
The above cmd runs the java program continuous as a background thread.
This script is executed from a... (1 Reply)
Discussion started by: sahan
1 Replies
5. SuSE
Maybe increase swap space will help? How to do it?
When I install suse 11 on this box, I remeber it shows the swap space is 2G, I didn't find it anywhere now... (5 Replies)
Discussion started by: fld2007
5 Replies
6. SuSE
Hi,
My program was running for a whole night. after 12 hours i got an error message "Cannot allocate memory" during the shmat commmand. So can you please let me know what could be the reason? is there any solution?
thanks in advance.
Regards,
Mano (5 Replies)
Discussion started by: ManoharanMani
5 Replies
7. Shell Programming and Scripting
Below UNIX script abruptly ends while reading second line from file. When I comment 'ssh' command the script works as expected. I think I will have to run ssh command in a different process, but haven't got a handle yet as regards to how to do that. Any help in resolving this problem is highly... (1 Reply)
Discussion started by: jeeteshkc
1 Replies
8. Red Hat
I have directory that has some billion file inside , i tried copy some files for specific date but it's always did not respond for long time and did not give any result.. i tried everything with find command and also with xargs..
even this command find . -mtime -2 -print | xargs ls -d did not... (2 Replies)
Discussion started by: before4
2 Replies
9. AIX
Hello Team,
Hope all doing well. I have tried to upgrade on of my AIX box too the latest SP and TL, but unfortunately it's got failed(Details are below). Need expert help to fix this.
Before up-gradation :
root@# oslevel -s
6100-07-01-1141
root@# instfix -i | grep ML
All... (3 Replies)
Discussion started by: gowthamakanthan
3 Replies
LEARN ABOUT DEBIAN
ns_rename
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)