07-27-2007
loop the mounts
hi there,
you could also do a small loop of the command in the different mounts you have. This could help decrease the number of files.
for i in echo "`df -k | awk '{print $1}'|grep '/'`"
do
find $i -user user_name -exec rm -rf {} \;
done
just an idea - of course it will not make problem better if you have all your files on the same mount.
Otherwise you can make a loop for instance in the 100 largest catalogs by using the `du YOURPWD -ok | sort -nr | head -10 | awk '{print $2 }'` instead of the df -k yadayada example above...
Anyway you do, you should always try to carry out a test using regular expressions to remove files or catalogs. You know... just to make sure anything not intended are trashed...
hope you make it work
10 More Discussions You Might Find Interesting
1. OS X (Apple)
is there a way to delete a mac os x user using unix? (3 Replies)
Discussion started by: CBarraford
3 Replies
2. AIX
how r u all,
i have AIX server which is kerberised, and i create a user on it called "sam"
when i want to assign a password for it i typed smit user then i choosed change password and i choosed the user " sam" when i press enter this message ' user 'sam' doesnt exist" appears.
then when i want... (2 Replies)
Discussion started by: abu7maid2005
2 Replies
3. UNIX for Advanced & Expert Users
Hi All,
Whenever I log in to my terminal and execute some cmds and then I type "history", I get the list of all the commands that I have executed.
I want to know where is the history been stored (any path location ?)
Secondly,if I want to delete the history or some part of the history, can... (9 Replies)
Discussion started by: shubhranshu
9 Replies
4. UNIX for Dummies Questions & Answers
Hi Professionals,
Need a way to restrict a user from his own directory so that he can't delete files from his directory but can read and write/overwrite. Is this information enuf for you people?
Pls reply.
Rgds,
Gaurav (2 Replies)
Discussion started by: gav_dhiman
2 Replies
5. UNIX for Advanced & Expert Users
hello,
Aside from userdel -r "username', are there any things needed to check before deleting a user? I wanted to cleanup user accounts and Im just worried if there are scripts or tasks created or owned by them that might be affected once I deleted the account. I normally login to their account... (2 Replies)
Discussion started by: lhareigh890
2 Replies
6. Shell Programming and Scripting
I want to delete all files and folders owned a user say abcuser in the folder /tmp .
Can you please give me the command ?
Thanks
Matt (2 Replies)
Discussion started by: lijjumathew
2 Replies
7. UNIX for Dummies Questions & Answers
I went to location where I need to delete all the files owned by me
I used the below code but it didn't work. It didn't throw any error but it hasn't deleted the files
find . -user username -exec rm -rf {} \;
Any suggestions please? (5 Replies)
Discussion started by: lakers646
5 Replies
8. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
9. Shell Programming and Scripting
I have following script to ping multiple ips but i want to delete ip.csv file content after running script .....but before deleting content i have ask user yes/No prompt depend on user input Yes/no ip.csv content will delete..
#!/bin/bash
for enodeb in `cat /tmp/ip.csv`
do
ping -c 2... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies
10. Shell Programming and Scripting
Good Afternoon,
I'm trying userdel -r username on Solaris 9 and getting
UX: userdel: ERROR: unable to find status about home directory: No such file or directory
I see the user's home directory and getent passwd shows the user
Anybody know what's causing it? (2 Replies)
Discussion started by: Stellaman1977
2 Replies
IGAWK(1) Utility Commands IGAWK(1)
NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO
gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)