sign in
|
add example
|
see also:
john
examples
favorites
badges
[
new example
]
copy
0
0
rsync --partial --progress --rsh=ssh user@host:/path/remote_file local_file
resume a partially transfered scp file
rsync
2 years, 4 months ago
john
0 |
details
|
copy
2
0
chmod +x script.sh
Make Script.sh executable
chmod
2 years, 4 months ago
john
0 |
details
|
copy
11
0
chmod -R 700 ~/.ssh
Make the .ssh directory only accessible to $USER
chmod
2 years, 4 months ago
john
0 |
details
|
copy
1
0
tcpdump -nS
see the basics without many options
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
0
0
tcpdump -nnvvS
good amount of traffic, with verbosity and no name help
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
0
0
tcpdump -nnvvXS
see a good amount of traffic, adds -X for payload but doesn't grab any more of the packet
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
0
0
tcpdump -nnvvXSs 1514
Capture size 1514
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
2
0
tcpdump host 192.168.1.100
Host based lookup, also works with hostname if you're not using -n
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
2
0
tcpdump src 172.19.1.124
Capture packes only from source
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
1
0
tcpdump dest 192.169.1.1
Capture packes from destination only
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
0
0
tcpdump not port 22
Filter out traffic on port 22
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
6
0
tcpdump -i eth1 not port 23
Listen on interface eth1 and exclude traffic from port 23
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
1
0
tcpdump -ni eth1 -c 10 not port 22
Only list for 10 packets on eth1, excluding traffic on port 22
tcpdump
2 years, 4 months ago
john
0 |
details
|
copy
11
0
echo 1 2 3 4 | grep 4
look for occurrences of 4 in 1 2 3 4
echo
grep
2 years, 4 months ago
john
0 |
details
|
copy
8
0
cat /etc/passwd | grep root
look for the root user in /etc/passwd
cat
grep
2 years, 4 months ago
john
0 |
details
|
copy
3
0
sudo dd if=ubu.img.dmg of=/dev/rdisk1 bs=1m
Clone ubu.img.dmg onto disk /dev/rdisk1 using 1mb block size
sudo
2 years, 4 months ago
john
0 |
details
|
copy
15
0
grep -R root *
look for the keyword root in all files recursively form the current directory
grep
2 years, 4 months ago
john
0 |
details
|
copy
7
0
cat /var/log/apache/access_log | grep 404
Look for 404 logs in apache
cat
grep
2 years, 4 months ago
john
0 |
details
|
copy
5
0
cat /var/log/apache/access_log | grep -v google
filter out hosts matching on the string google
cat
grep
2 years, 4 months ago
john
0 |
details
|
copy
6
0
chown -R root:root /etc/
make sure the /etc is owned by root for all files and directories
chown
2 years, 4 months ago
john
0 |
details
|
copy
0
0
chown john:john mydoc.doc
change the ownerships on mydoc.doc to user john, group john
chown
2 years, 4 months ago
john
0 |
details
|
copy
2
0
chown john:john mydoc.doc
change the ownerships on mydoc.doc to user john, group john
chown
2 years, 4 months ago
john
0 |
details
|
copy
6
0
smbclient -L myhost.com
List the shares on myhost.com
smbclient
2 years, 4 months ago
john
0 |
details
|
copy
10
0
smbclient \\\\192.168.1.1\\D
list the windows share only for the D:\
smbclient
2 years, 4 months ago
john
0 |
details
|
copy
7
0
/usr/bin/smbclient \\\\myhost.com\\public mypasswd
2 years, 4 months ago
john
0 |
details
|
copy
31
0
smbclient \\\\192.168.1.1\\D -U myuser
smbclient
2 years, 4 months ago
john
0 |
details
|
copy
2
0
ls | tee file.txt
ls to screen and also file
ls
tee
2 years, 4 months ago
john
0 |
details
|
copy
3
0
ls | tee file1.txt file2.txt file3.txt
write ls to screen and 3 files
ls
tee
2 years, 4 months ago
john
0 |
details
|
copy
0
0
crontab -l | tee backup.txt
list your crontab, and create a backup
crontab
tee
2 years, 4 months ago
john
0 |
details
|
copy
0
0
lint myprogram.c | tee -a myprogram.lint
display and append to myprogram.lint
tee
lint
2 years, 4 months ago
john
0 |
details
|
copy
0
0
ifconfig | tee OutputFile.txt
list and store ifconfig in OutputFile.txt
ifconfig
tee
2 years, 4 months ago
john
0 |
details
|
copy
2
0
sha1sum file.txt
Create a sha1 of file.txt
sha1sum
2 years, 4 months ago
john
0 |
details
|
[
new config
]
[
ask question
]