The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
arg list too long Zenwork Shell Programming and Scripting 2 10-08-2008 04:06 PM
Arg List too Long in SCP chris1234 UNIX for Dummies Questions & Answers 5 02-27-2008 08:40 AM
ksh: /usr/bin/ls: arg list too long jitindrabappa UNIX for Dummies Questions & Answers 2 10-12-2006 04:08 AM
ls -t arg list too long CSU_Ram UNIX for Dummies Questions & Answers 4 05-05-2005 11:19 AM
arg list too long vingupta UNIX for Dummies Questions & Answers 5 08-03-2001 12:43 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-17-2009
Codesearcher Codesearcher is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 28
Paramater list too long while chmod

Hi i am transferring the files(around 10000) from the Windows sever to the UNIX server in that i run a command chmod 777 filename.txt
but it is taking a longer time as it gives chmod for each and every file.
So i thouught of giving the permission from the UNIX itself and i tried running
chmod 777 filename.txt and it is throwing an error Parameter list is too long.
So i tried it with find . -name "filename*.txt" -exec chmod 777 {} \;

still i get the error parameter list is too long!
Any other options to avoid this error wud be highly appreciated!
Thanks in advance!
  #2 (permalink)  
Old 07-17-2009
lathavim lathavim is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 73
See if this works. Make sure you are in the required directory.



Code:
 
ls filename*.txt | xargs chmod 777

  #3 (permalink)  
Old 07-17-2009
quintet quintet is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 95
I hope even
Code:
ls filename*.txt | xargs chmod 777

would fail paramater list too long as it tries to expand filename*.txt for ls.

I think the following command would work:


Code:
ls -1|grep \\.txt$|xargs chmod 777

Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0