hi all,
i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ...
specifically, i'd like to:
(1) specify a src directory
(2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs
(3) clone that same, empty dir hierarchy to... (2 Replies)
Hi all,
I need to check the size of all files in a DIR.Can any one help me out from this?
This is my code:
filenames=`ls -l | cut -c 55-90`
for f in $filenames
do
if then
echo $f
done
Output:
file access denied.
*files have read permission alone. (6 Replies)
hi,
i am new to this site.
i want to write a script to compare the file size of the files in the current dir with the files in the previous directory.
the files name will be same, but the filename format will be as xyzddddyymm.txt. the files will arrive with the month end date(i want to... (5 Replies)
I have a folder which in turn has numerous sub folders all containing pdf files with same file named in different ways.
So I need a script if it can be written to find and print the duplicate files (That is files with same size) along with the respective paths.
So I assume here that same file... (5 Replies)
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
I am very new to unix as well as shell scripting.
I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file
Please help me in this regard and many thanks in advance. (3 Replies)
How to use 'df' only to get the 'Available' space for a specific dir, and then compare with a specific file size using stat -c %s file.txt to see if the file actually can be copied into the dir. Is there any quick way to see if a file can fit into a dir? (4 Replies)
Hi all,
Great thanks to all for support till today..today i came here for 1 new issue :-( in our organization we are developing a job portal web application for a client. using Apache-tomcat we are hosting this application, now i need to delimit the applications directory comer under the webapps... (1 Reply)
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies
LEARN ABOUT HPUX
user
FBB::User(3bobcat) /etc/passwd user info FBB::User(3bobcat)NAME
FBB::User - Provides the /etc/passwd info of the current user
SYNOPSIS
#include <bobcat/user>
Linking option: -lbobcat
DESCRIPTION
This class retrieves the information of the current user from the information in /etc/passwd. The class is a simple wrapper class around
the getpwent(3) function.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM -
CONSTRUCTORS
o User():
The default constructor determines the current user's data. This constructor throws an Errno exception if it did not properly com-
plete because the current user name could not be found in /etc/passwd. The copy and move constructors are available.
OVERLOADED OPERATORS
The copy and move assignment operators are available.
MEMBER FUNCTIONS
o size_t groupid() const:
Returns the user's group-id.
o std::string homedir() const:
Returns the user's home directory (including a trailing /).
o std::string name() const:
Returns the user's user-name.
o std::string password() const:
Returns the user's encrypted password. But see also the BUGS section.
o std::string realname() const:
Returns the user's real name, as listed in the /etc/passwd's gecos field.
o std::string shell() const:
Returns the user's shell.
o size_t userid() const:
Returns the user's user-id.
o void verify() const:
Obsoleted, will be removed in a future Bobcat release.
EXAMPLE
#include <bobcat/user>
#include <iostream>
using namespace std;
using namespace FBB;
int main()
{
User user;
user.verify();
cout << "
"
"name : " << user.name() << "
" <<
"password : " << user.password() << "
" <<
"user id : " << user.userid() << "
" <<
"group id : " << user.groupid() << "
" <<
"real name : " << user.realname() << "
" <<
"home dir : " << user.homedir() << "
" <<
"shell : " << user.shell() << "
" << endl;
return 0;
}
FILES
bobcat/user - defines the class interface
SEE ALSO bobcat(7), getpwent(3)BUGS
If the user is a member of multiple groups, only the group id listed in /etc/passwd is returned by groupid().
If shadow passwording is used, the string returned by password() will probably not contain the encrypted password.
DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature;
o bobcat_3.01.00-x.tar.gz: source archive;
o bobcat_3.01.00-x_i386.changes: change log;
o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::User(3bobcat)