$ svn list --verbose -R path/to/repo >> fileList.txt
$ rmdir /s/q C:\folder\path
$ mysqldump -u YourUser -p YourDatabaseName > exportedFile.sql
$ CREATE TABLE myTable_copy LIKE myTable;
$ INSERT myTable_copy SELECT * FROM myTable;
$ svn diff path/to/file --diff-cmd /usr/bin/diff -x "-w"
$ svn revert . --depth=infinity
$ du -h -d1 /usr/svn/
For windows: https://learn.microsoft.com/en-us/sysinternals/downloads/du
$ du64 -nobanner -l 1 "C:\path"
sudo su -
$ chmod +x script.pl
sudo usermod -aG adm YourUserName
nano /var/log/apache2/access.log
https://serverfault.com/questions/836578/killing-a-perl-process-in-linux
$ ps -ef | grep backup
user 1234 0 Feb02 ? 01:13:31 /usr/bin/perl ...
$ sudo kill 1234
svn ls file:///C:/Path/To/SvnDir
curl http://some.url --output some.file
https://stackoverflow.com/questions/25010369/wget-curl-large-file-from-google-drive
Replace FILEID and FILENAME:
$ wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
$ sudo rm -rf dirs_*
$ nohup 7z x file.7z -o"/mnt/efs/path" -pPASSWORD -y &
$ nohup long-running-process &
to see the log:
$ tail -f nohup.out
https://gist.github.com/marcesher/7168642
$ sudo yum-config-manager --enable epel
$ sudo yum install -y p7ip
$ sudo cp /usr/bin/7za /usr/bin/7z
http://northwaygames.com/setting-up-subversion-on-amazon-ec2-for-free/
sudo a2enmod dav_svn
sudo a2enmod authz_svn
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNReposRelativeAccessFile authz
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
sudo chown -R www-data:www-data /var/www/svn
sudo chmod -R 775 /var/www/svn
## First create pwd file
sudo htpasswd -m -b /etc/apache2/dav_svn.passwd [newuser] [newpwd]
curl -d "param1=value1¶m2=value2" -X POST http://localhost:8081/postMethod
curl -d "{\"key1\":\"value1\"}" -H "Content-Type: application/json" -X POST http://localhost:8081/echo
router.post( '/echo', ( req, res ) => {
logger.debug( `echo/ ${JSON.stringify( req.body )}` );
res.send( req.body );
} );
CREATE USER 'user'@'localhost' IDENTIFIED BY 'pwd';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION;
CREATE USER 'user'@'%' IDENTIFIED BY 'pwd';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' WITH GRANT OPTION;
SHOW GRANTS FOR user;
FLUSH PRIVILEGES;
svn update --set-depth exclude folderToIgnore
df
lsof | grep deleted
killall -9 gdrive
du -hs * | sort -rh | head -10
sc create svnserve binpath="\"C:\pathTo\svnserve.exe\" --service -r D:\repoPath" displayname="SVN Server" depend=Tcpip start=auto
sudo apt-get install zip unzip -y
zip -r OUTPUT.zip FOLDER
cat /var/run/motd.dynamic
https://www.cyberciti.biz/faq/how-to-check-cron-logs-in-ubuntu-linux/
$ sudo nano /etc/rsyslog.d/50-default.conf
Uncoment the line (i.e. remove #):
cron.* /var/log/cron.log
$ sudo service rsyslog restart
$ sudo service cron restart
http://kvz.io/blog/2007/07/29/schedule-tasks-on-linux-using-crontab/
$ sudo crontab -e
## minute : hour : day_of_month : month : day_of_week : command
15 10,13,17 * * 1-6 /usr/svn/back.pl > /usr/svn/back.log 2>&1
1 1 * * 2-6 /home/utils/backup_mantis.pl 2>&1
0 23 * * 7 /usr/svn/backfull.pl > /usr/svn/backfull.log 2>&1
@reboot /home/utils/rebootmail.pl
$ chown -R username:group /path/directory/
$ curl -T my-local-file.txt ftp://ftp.example.com --user username:password
$ curl --user username:password 'ftp://ftp.host.com/file' -o '/path/to/download'
mklink [[/d] | [/h] | [/j]] <Link> <Target>
$ mklink /D C:\xampp\htdocs\www C:\dev\html\project\build
$ ln -s /path/target /path/symlink
https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit
git rebase -i <HASH_OF_COMMIT_BEFORE_THE ONE_WE_WANT_TO_CHANGE>
## change 'pick' to 'edit' on the editor, [ESC] + :wq (to close vim)
git commit --amend --author="Author Name <email@address.com>" --no-edit
git rebase --continue
git push -f