-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests
More file actions
52 lines (37 loc) · 824 Bytes
/
Copy pathtests
File metadata and controls
52 lines (37 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
echo $PATH
VAR1="test"
export VAR1
export VAR2="test2"
bash
echo $VAR1
echo $VAR2
ping -i 0.2 google.com | grep time
ip a | grep inet | grep -v inet6 | awk '{print $2}' | tail -n1 | cut -d'/' -f1
cat < /etc/passwd > passw
cat < /etc/group >> passw
# signals
ping google.com
^Z
ps aux | grep [g]oogle.com | awk '{print $2, $8}'
kill -18 PINGPID
ls -l > output &
cat output
ls -l > output && echo 'success' || echo 'fail'
ls -l NONE_EXISTANT_FILE > output && echo 'success' || echo 'fail'
cd /tmp
pwd
ulimit -a #list current limits
ulimit -n 1
cat > sdaasdasd
ulimit -u 1
ls
ulimit -n 1
cat > sdaasdasd
bash# ./shell
0: exit 10
bash# echo $? #should write 10
type -a pwd
pwd is a shell builtin
pwd is /bin/pwd
nice -n 10 ping google.com > /dev/null &
ps ax -o pid,ni,cmd | awk '/[g]oogle.com/ {print $2}'