08-27-2009
for file in `find /home/project/ -type f`
do
rm -f $file
done
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to write a shell script which can delete all the files and directories recursively inside the specified directory but should not delete the specified directory.
Please some body help me in writing the script. (3 Replies)
Discussion started by: deepthi.s
3 Replies
2. Shell Programming and Scripting
i have 200000bytes size of a unix file i need to delete some text between two strings recursively using a loop with sed or awk . these two strings are : 1st string getting from a file :::2 nd string is fi...its constant . can anyone help me sed -n'/<1 st string >/,/fi/' <input_filename> is the... (2 Replies)
Discussion started by: santosh1234
2 Replies
3. Shell Programming and Scripting
Recently all of the php files on my server got injected with some dating site code and I'm trying to get rid of it all at once. I've tried using sed but I don't know how to escape it correctly because I don't really know what I'm doing. Could you guys help me with the syntax?
find ./* -type f... (2 Replies)
Discussion started by: ISOcrates
2 Replies
4. Shell Programming and Scripting
Hi all,
I would need a bash script to sync/transfer folders recursively via FTP/RSYNC
(I initially planned to use FTP but I heard RSYNC would fit a lot better for this job(?))
The situation:
3 different Linux servers
1. source
2. destination - Samba
3. Server where the script runs on
... (2 Replies)
Discussion started by: thibautp
2 Replies
5. UNIX for Advanced & Expert Users
Hi All,
We have a requirement to recursively delete the directories and its subdirectories older than 60 days based on timestamp (folder creation timestamp)under certain directory. However it has some specific requirements.
The directories will continue to be there upto any depth.
the... (0 Replies)
Discussion started by: rcvasu
0 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a dir structure that has many many subdirs, I would like to dump all the files from al the sub-dirs into a single directory? Can someone tell me the mv command that would do this please?
before example:
datadir/
datadir/datajan/jan.dat
datadir/datafeb/feb.dat
after example:... (1 Reply)
Discussion started by: CountryGent
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
I want to delete all empty directories in a long directore tree structure. I want to use that from a script that will run on HP-UX 11. My definition of empty directory is that there is no regular file under it and directly beneath it. To elaborate, I have below directories.
/app/dev/java... (14 Replies)
Discussion started by: asutoshch
14 Replies
8. Shell Programming and Scripting
hi all
I want a script that will use ftp to copy folder and sub folders from source server to current server. if i use -r switch then it just copies folders for 5 level. (1 Reply)
Discussion started by: kashif.live
1 Replies
9. Shell Programming and Scripting
hello,
I'm trying to figure out which tool is best for recursively renaming and files or folders using the characters \/*?”<>| in their name. I've tried many examples that use Bash, Python and Perl, but I'm not much of a programmer I seem to have hit a roadblock.
Does anyone have any... (15 Replies)
Discussion started by: prometheon123
15 Replies
10. Shell Programming and Scripting
Hio, So I have a crontab delete of older files setup. This script works fine if I run them by each individual directory.
Problem is there are so many thousands of files and hundreds of directories and sub directories that I need to recursively have it go through and delete files by directory... (2 Replies)
Discussion started by: vsekvsek
2 Replies
FINGER(1) General Commands Manual FINGER(1)
NAME
finger - user information lookup program
SYNOPSIS
finger [ options ] name ...
DESCRIPTION
By default finger lists the login name, full name, terminal name and write status (as a `*' before the terminal name if write permission is
denied), idle time, login time, and office location and phone number (if they are known) for each current UNIX user. (Idle time is minutes
if it is a single integer, hours and minutes if a ':' is present, or days and hours if a 'd' is present.)
A longer format also exists and is used by finger whenever a list of people's names is given. (Account names as well as first and last
names of users are accepted.) This format is multi-line, and includes all the information described above as well as the user's home
directory and login shell, any plan which the person has placed in the file .plan in their home directory, and the project on which they
are working from the file .project also in the home directory.
Finger may be used to lookup users on a remote machine. The format is to specify the user as ``user@host.'' If the user name is left off,
the standard format listing is provided on the remote machine.
Finger options include:
-m Match arguments only on user name.
-l Force long output format.
-p Suppress printing of the .plan files
-s Force short output format.
FILES
/etc/utmp who file
/etc/passwd for users names, offices, ...
/usr/adm/lastlog last login times
~/.plan plans
~/.project projects
SEE ALSO
chfn(1), w(1), who(1).
AUTHOR
Earl T. Cohen
BUGS
Only the first line of the .project file is printed.
There is no way to pass arguments to the remote machine as finger uses an internet standard port.
4th Berkeley Distribution May 10, 1986 FINGER(1)