Teamsite Folder - teamsite

Is there a command-line utility to create folders/sub-folders inside a workarea in Teamsite?
I went through a list, and all it seems to contain were those concerning creation/modification of groups/branches and related permissions.

the folders and files are standard system files and folders, so you use standard command line tools (CLTs) to do what you want.
for example in windows, you'd use DOS command 'mkdir ' to create a folder.

Yes, there should be a command by which we can create files and folders inside a Workarea.
Since, to some extent Branches, Workareas etc are customizable and can be created through command-line tool (CLT) instead of TeamSite UI. Even through command line tool we can easily fetch number of branches, workareas etc present in a particular branch. You can refer to "WebContentManagement_CommandLineTools_en.pdf" for the same and check inside workarea section the list of commands.
Please vote the solution if its helpful. Thanks!

Related

Trying to Set a Shortcut to a Directory

Im trying to run several different scripts on my Mac for data stored in different paths. So I put all said scripts into a folder. In order for a script to work, I have to be cd'd to a specific folder required for said script. I use the scripts to get different types of output (ex: Image volumes, MRI info, etc..).
I was wondering if there was a way to store all my scripts in one directory and assign a shortcut to it. That way, I can cd to my folder, and only type something like $ScriptsFolder/Script_1 to have it. Ive seen this done in the FSL software package, where typing $FSLDIR/data/standard would give you the items in that folder.
UPDATE:
Im using Script=/Users/ray/Documents/Script which works until I close down my terminal to start a new one. Any way to make the setup permanent?
EDITED
Found this helpful in the end.
http://www.techradar.com/how-to/computing/apple/terminal-101-creating-aliases-for-commands-1305638
I used it to create a shortcut to my scripts which are all placed in a folder for easy referencing.

How does one add a single file to a perforce repository?

I have a large shared drive (~500Gb, 20k files, samba/afs). I would like to add all the files in there to a perforce repository.
I imagine adding/committing them all in one fell swoop is not a good idea.
How would I then to do that? Add/commit one by one? And would that ensure that the files on the shared drive are NOT locked?
I am comfortable with bash or perl, and this would have to happen under Mac OS X.
Bonus question: would the method also allow checking in the same files if they get changed on the shared drive via a cron job?
Thanks.
It will depend on your hardware what Perforce can handle. You should not likely have to add the files one at a time, however. This article here shows how to add whole directories at once:
Regarding your bonus question, yes you can easily handle files modified by your cron job by using the reconcile method. See the section 'Reconcile through the Command Line' in this article.

Where should I put a template folder for a bash script?

I'm on OS-X (Mavericks, if that matters), and I'm making a bash script that will use resources from a folder called "templates". I'm trying to figure out where I should put it (the templates folder). I'd like to make it so the user doesn't need to modify their path when they install it, so I'd rather not do it the way the terminal mysql command does it (it lives in a folder in /usr/local/mysql/bin). I really want to be able to put them into usr/bin, but I don't know if it's "polite" to put folders in there (I don't see any in there).
Right now I'm leaning towards putting the scripts in usr/bin and having the templates in usr/lib. Is that how this type of thing is normally done, or is there another way? I'd like to follow a convention, assuming there is one. I'd also like it to apply to as many Unix platforms as possible (I'd like to put in a directory where bash scripts live that's consistent across as many Unix platforms as possible). Thanks.
If you follow the Filesystem Hierarchy Standard (FHS), your executable goes in /usr/local/bin, while read-only template files go in /usr/local/share/YOURAPP/. To quote the FHS:
/usr/local/share
The requirements for the contents of this directory are the same as /usr/share. […]
and:
The /usr/share hierarchy is for all read-only architecture independent data files.
(Emphasis added)
If the system admin is meant to customize the template files to take effect system-wide, then they would simply go in /etc/YOURAPP/templates (or something like that).
If the template files are customized on a per-user basis, then the modified copies of the templates (copied from /usr/local/share/YOURAPP/templates) need to be saved in the user's directory, under $HOME/.config/YOURAPP/templates or something like that (thanks to technosaurus for the correction).
You mentioned that you want to install the templates in a directory alongside your executable. That is not the standard approach on UNIX, at least going by the FHS. If you really want to go this route, there is a sort of convention of installing your app to /opt/YOURAPP/, using whatever organization you want inside that folder.
In all cases, it is not good practice to install executables directly to /usr/bin, as that directory is considered to be under the exclusive control of the OS/distribution. If you want to install there, the accepted way to do that is to create a package for the package manager of every supported OS/distribution.

Zip a folder structure from a batch file on windows server

I want to zip a folder structure from a batch file on the windows server. Lets say Structure is Like D:/DBA/ and inside DBA there are many folders with files and in DBA folder also there are files. Now i Want to Zip this DBA Folder and all folders and files inside it.
Kindly suggest how can i achieve this from a batchfile. Thanks in advance
Multiple forums suggest that the zip functionality built into Windows is provided by dlls for which there is no command line argument. For example:
The unzipping is a function of `zipfldr.dll`, so would use `regsvr32.exe` to invoke it, and as far as I know there are no arguements you can add to it for unzipping via batch file.
I would recommend a third party program, of which there are many (which you could provide along with a script): 7zip, winzip, pkzip, etc.
Also you might want to look into below as alternatives to batch files:
VBScript: Windows' built-in ZIP compression to be scripted
It's not possible without a third-party zip tool. Windows does not include a command-line zip tool.
It's not possible, as Windows Server doesn't have ZIP-compatible archiver.
As a "built in" option, you can check Windows Server Resource Kit Tools download, which contains compress.exe tool, but it's not compatible with .zip format.
Another option is to use 7zip standalone (7za) executable, which doesn't need to be installed and works "out of the box".

What command to use to get the revision history of the files in a folder

I am trying to get the revision history of files from my windows views of a project. I know that there is a command in Unix that I can give and it will provide the file-names in one column and associated revision dates in parallel column (or something similar). I can use unix view from my windows and also I have created the folders view of the src code directly from windows. Does anybody know what is that command? If so please help.
BR
Vard
ls -l will give you modification times of the files, but Unix/Linux doesn't (by default) store revisions. For that you'll need some sort of SCM system (e.g. Git / SVN / CVS etc.)
Clearcase (an SCM) provides a filesystem that allows you to store revisions of the file natively. That may be another option. Versions appear in subdirectories corresponding to each file.

Resources