yurko
10/24/2017 - 3:56 PM

kill process by port

shell

# kill by port
sudo kill -9 $(lsof -i :3000 -t)

# wget with range
wget --user user --password password http://example.com/{0..n}.jpg

# scp
scp dev@123.123.123.123:projects/dev.log /home/dev/dev.log

# Bulk rename
for f in *controller*; do mv $f $(echo $f | sed 's/^foo/bar/g'); done;`

# Symlinks
ln -s source target
find . -type l -ls
unlink /path/to # remove symlink