大约有 14,000 项符合查询结果(耗时:0.0151秒) [XML]
Export and Import all MySQL databases at one time
...=/root/.my.cnf --databases "$db" > "$tmp/$db.sql"
done
# Go to tmp dir
cd $tmp
# Compress all dumps with bz2, discard any output to /dev/null
sudo tar -jcf "$out" * > "/dev/null"
# Cleanup
cd "/tmp/"
sudo rm -rf "$tmp"
...
Convert absolute path into relative path given a current directory using Bash
...ment: Instead of setting source/target directly to $1 and $2, do: source=$(cd $1; pwd) target=$(cd $2; pwd). This way it handles paths with . and .. correctly.
– Joseph Garvin
Apr 4 '12 at 15:11
...
Set up adb on Mac OS X
...lick on the SDK Platform-Tools for Mac link.
Go to your Downloads folder
cd ~/Downloads/
Unzip the tools you downloaded
unzip platform-tools-latest*.zip
Move them somewhere you won't accidentally delete them
mkdir ~/.android-sdk-macosx
mv platform-tools/ ~/.android-sdk-macosx/platform-tool...
Is there a way to get the git root directory in one command?
...ou put that in an alias? If I put it in my .zshrc, and I define `alias cg="cd $(git root)", the $() part gets evaluated at source-time, and always points to ~/dotfiles, as that is where my zshrc is.
– zelk
Dec 1 '12 at 7:36
...
Listing only directories using ls in Bash?
...he PWD.
To test this: Create a directory (mkdir) named like test-dir, and cd into it:
mkdir test-dir; cd test-dir
Create some directories:
mkdir {cs,files,masters,draft,static} # safe directories.
mkdir {*,-,--,-v\ var,-h,-n,dir\ with\ spaces} # some a bit less secure.
touch -- 'file with space...
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.2.dylib
...the steps to install old version:
Go to homebrew-core directory:
$ cd $(brew --repository)/Library/Taps/homebrew/homebrew-core
Check the hash for old Formula:
$ git log master -- Formula/readline.rb
Find the corresponding version of the hash value
commit 1dd4221c35716d6bec3...
Import existing source code to GitHub
... --global user.email email@gmail.com
Next steps:
mkdir audioscripts
cd audioscripts
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:ktec/audioscripts.git
git push -u origin master
Existing Git repository?
cd existing_git_...
Bash: Copy named files recursively, preserving folder structure
...
One way:
tar cf - <files> | (cd /dest; tar xf -)
share
|
improve this answer
|
follow
|
...
Git for beginners: The definitive practical guide
... in the directory which contains the files you wish to track.
For example,
cd ~/code/project001/
git init
This creates a .git (hidden) folder in the current directory.
To make a new project, run git init with an additional argument (the name of the directory to be created):
git init project002
(Th...
How to get CRON to call in the correct PATHs
...ion!
CRONTAB run script or command with Environment Variables
0 9 * * * cd /var/www/vhosts/foo/crons/; bash -l -c 'php -f ./download.php'
0 9 * * * cd /var/www/vhosts/foo/crons/; bash -l -c download.sh
share
|
...
