10 More Discussions You Might Find Interesting
1. Solaris
Dear Experts,
I would like to know what's the best method for copy data around 3 mio (spread in a hundred folders, size each file around 1kb) between 2 servers?
I already tried using Rsync and tar command. But using these command is too long.
Please advice.
Thanks
Edy (11 Replies)
Discussion started by: edydsuranta
11 Replies
2. Shell Programming and Scripting
Hi expert,
Is there any fastest way to calculate recursive directory, and I have total 600 directories have 100000 files and 10 directory approximately 9000000 - 10000000 each files per directory. currently using this command "du -k --max-depth=0" to get the size but very slow it take 24 hours... (9 Replies)
Discussion started by: rufino
9 Replies
3. Programming
Hi all,
We use strlen() fun provided by library to find the length of a string.
Looking inside of it, it has some different mechanism to find the length of string.
Normally, we scan the string byte by byte until the '\0' character. It takes a logn time to count length.
The Library strlen()... (2 Replies)
Discussion started by: yogeshrl9072
2 Replies
4. Solaris
Hi Experts,
I've been asked if there is a fast way to duplicate a file(10GB) and zip it at the same time. The zipped file would be FTP'd.....management is asking this. Maybe there is a better method all together? any ideas? CP will not cut it.
Thanks in advance
Harley (1 Reply)
Discussion started by: Harleyrci
1 Replies
5. Shell Programming and Scripting
I have a 5 GB text file(log/debug)
I want to delete all lines containing 'TRACE'
Command used
sed -i '/TRACE/d' mylog.txt
Is there any other fastest way to do this? (1 Reply)
Discussion started by: johnbach
1 Replies
6. UNIX for Advanced & Expert Users
I want to search a file in fastest manner.
Presently I am using 'find' command. But it is taking around 15min for searching. Is there any other method through which I can do it fast? (3 Replies)
Discussion started by: vaibhavbhat
3 Replies
7. Shell Programming and Scripting
hello
i need help to remove directory . The directory is not empty ., it contains
several sub directories and files inside that..
total number of files in one directory is 12,24,446 .
rm -rf doesnt work . it is prompting for every file ..
i want to delete without prompting and... (6 Replies)
Discussion started by: getdpg
6 Replies
8. UNIX for Dummies Questions & Answers
Hi!
I have thousands of sub-directories, and hundreds of thousands of files in them. What is the fast way to find out which files are older than a certain date? Is the "find" command the fastest? Or is there some other way?
Right now I have a C script that traverses through and checks... (5 Replies)
Discussion started by: sreedharange
5 Replies
9. Shell Programming and Scripting
I have searched the FAQ - by using sort, duplicates, etc.... but I didn't get any articles or results on it.
Currently, I am using:
sort -u file1 > file2 to remove duplicates. For a file size of 1giga byte approx. time taken to remove duplicates is 1hr 21 mins.
Is there any other faster way... (15 Replies)
Discussion started by: radhika
15 Replies
10. UNIX for Dummies Questions & Answers
wich is the fastest command in HP-UX to copy an entire disk to dat tapes, or even disk to disk?
thanks (0 Replies)
Discussion started by: vascobrito
0 Replies
GIT-SHELL(1) Git Manual GIT-SHELL(1)
NAME
git-shell - Restricted login shell for Git-only SSH access
SYNOPSIS
chsh -s $(command -v git-shell) <user>
git clone <user>@localhost:/path/to/repo.git
ssh <user>@localhost
DESCRIPTION
This is a login shell for SSH accounts to provide restricted Git access. It permits execution only of server-side Git commands implementing
the pull/push functionality, plus custom commands present in a subdirectory named git-shell-commands in the user's home directory.
COMMANDS
git shell accepts the following commands after the -c option:
git receive-pack <argument>, git upload-pack <argument>, git upload-archive <argument>
Call the corresponding server-side command to support the client's git push, git fetch, or git archive --remote request.
cvs server
Imitate a CVS server. See git-cvsserver(1).
If a ~/git-shell-commands directory is present, git shell will also handle other, custom commands by running "git-shell-commands/<command>
<arguments>" from the user's home directory.
INTERACTIVE USE
By default, the commands above can be executed only with the -c option; the shell is not interactive.
If a ~/git-shell-commands directory is present, git shell can also be run interactively (with no arguments). If a help command is present
in the git-shell-commands directory, it is run to provide the user with an overview of allowed actions. Then a "git> " prompt is presented
at which one can enter any of the commands from the git-shell-commands directory, or exit to close the connection.
Generally this mode is used as an administrative interface to allow users to list repositories they have access to, create, delete, or
rename repositories, or change repository descriptions and permissions.
If a no-interactive-login command exists, then it is run and the interactive shell is aborted.
EXAMPLE
To disable interactive logins, displaying a greeting instead:
$ chsh -s /usr/bin/git-shell
$ mkdir $HOME/git-shell-commands
$ cat >$HOME/git-shell-commands/no-interactive-login <<EOF
#!/bin/sh
printf '%s
' "Hi $USER! You've successfully authenticated, but I do not"
printf '%s
' "provide interactive shell access."
exit 128
EOF
$ chmod +x $HOME/git-shell-commands/no-interactive-login
To enable git-cvsserver access (which should generally have the no-interactive-login example above as a prerequisite, as creating the
git-shell-commands directory allows interactive logins):
$ cat >$HOME/git-shell-commands/cvs <<EOF
if ! test $# = 1 && test "$1" = "server"
then
echo >&2 "git-cvsserver only handles "server""
exit 1
fi
exec git cvsserver server
EOF
$ chmod +x $HOME/git-shell-commands/cvs
SEE ALSO
ssh(1), git-daemon(1), contrib/git-shell-commands/README
GIT
Part of the git(1) suite
Git 2.17.1 10/05/2018 GIT-SHELL(1)