10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying find files in sub dir with certain tags using tag command, and add the period to the beginning. I can't use chflags hidden {} cause it doesn't add period to the beginning of the string for web purpose. So far with my knowledge, I only know mdfind or tag can be used to search files with... (6 Replies)
Discussion started by: Nexeu
6 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to use find in kshell (AIX) to find all files with perms of
write for other
AND
any execute bit set.
e.g:
r--r-x-w- would qualify
and rw-rw--wx would qualify
but ---rwxr-xr-x wouldn't qualify
So far, I've been trying something like this:
find . -type f -perm... (4 Replies)
Discussion started by: alanp36
4 Replies
3. Shell Programming and Scripting
Guys i want to run a command to list all directories that havn't been modified in over 548 days ( 1.5 yrs ).
Id like to run a script to first print what the command finds ( so i get a list of the files pre move ... i have a script set for this :
find /Path/Of\ Target/Directory/ -type d -mtime... (4 Replies)
Discussion started by: modulartention
4 Replies
4. Shell Programming and Scripting
hi,
i've been trying to figure this weird error but I cannot seem to know why. I am using below find command:
find . \( ! -name . -prune \) -type f -mtime +365 -print
The above code returns no file because no files are really more then 365 days old. However, when I use xargs, its... (9 Replies)
Discussion started by: The One
9 Replies
5. UNIX for Dummies Questions & Answers
I am trying to delete files older than 60 days from a folder:
find /myfolder/*.dat -mtime +60 -exec rm {} \;
ERROR - argument list too long: find
I can't just give the folder name, as there are some files that I don't want to delete. So i need to give with the pattern (*.dat). I can... (3 Replies)
Discussion started by: risshanth
3 Replies
6. Shell Programming and Scripting
Hi,
I am cutting data from a fixed length test file and then writing out a new record using the echo command, the problem I have is how to stop multiple spaces from being written to the output file as a single space.
Example:
cat filea | while read line
do
field1=`echo $line | cut -c1-2`
... (6 Replies)
Discussion started by: dc18
6 Replies
7. Shell Programming and Scripting
Dear All,
Please advice about this issue.
when i run this line in a script if && || && || && if i enter $x = test3 and $y = test1 the If condition apply while it should not
Best Regards (2 Replies)
Discussion started by: islam.said
2 Replies
8. UNIX for Dummies Questions & Answers
Dear all,
I have tried the following 2 lines
xargs -t -i -exec grep -i -w {} file_1 >>test < file_2
cat -s file_2| xargs -t -i -exec grep -i -w {} file_1 >> test
They were meant to search for the contents of file_2 in file_1 and write the respective lines of file_1 into file "test" .... (15 Replies)
Discussion started by: Bruno
15 Replies
9. UNIX for Dummies Questions & Answers
Hello All,
I'm trying the following:find . -name "*" -exec grep -ln "IsAlpha" {} \;
It gives me file names only (having string "IsAlpha"), I want to get line numbers also, something like this: test 1: Line 52
test 1: Line 95 etc
Is it possible to obtain using grep & find only. (5 Replies)
Discussion started by: nervous
5 Replies
10. Shell Programming and Scripting
I'm trying to tar the files I get from the 'find' command result. However I can't make it run successfuly? This is for our archiving process.
Here is my script:
find /mnt/LOGS -mtime -10 -name "TUXLOG.*" -exec tar -cvf /mnt/LOGS/combine.tar {} \;
Im not sure why it is not working or it is... (2 Replies)
Discussion started by: kharen11
2 Replies