Advertisement
Jobjob

tplinux1

Dec 20th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.05 KB | None | 0 0
  1. 1) /
  2. 2) /
  3. 3) ls -ali
  4. 4) /
  5. 5) ls -Rali
  6. 6) (Dans le répertoire unix)
  7.     $ pushd
  8.     $ cd rep1
  9.     $ pwd
  10.     $ popd
  11. 7) /
  12. 8)
  13. 28) head -n 80 /etc/passwd | tail -n 10
  14. 29) grep --color -E '^[[:alnum:]]{3,4}:|^[[:lower:]]{,}e:' /etc/passwd
  15. 30) grep --color -E -v 'bash$' /etc/passwd
  16. 31) grep --color -E '(.)\1' fichier.txt
  17. 32) sed -rn -e '/^#|^$|^[[:space:]]*$/!p' fichier.txt
  18. 33) sed -n '/^os/s/^\([^:]*\):\([^:]*\):\([^:]*\):/\3:\2:\1:/p' /etc/passwd
  19. 34) sed -rn '/^osms[[:digit:]]*1:/p' /etc/passwd | cut -d: -f1,3,5 | sed -n '/^./s/^\(.*\),,,$/\1/p'
  20. 35) sed 'y/éèàù/eeau/' fichieraccents.txt
  21.  
  22. ##############
  23. #CORRECTIONS:#
  24. ##############
  25. 26) find / -inum 2
  26. #grep -E = egrep
  27. 29) grep --color -E "^[^:]{3,4}:|^[^:]*e:" /etc/passwd
  28. 30) grep -Ev "bash$" /etc/passwd
  29. 31) grep -E ".*(.)\1.*" fichier.txt
  30. 32) sed -e "/^#/d" -e "/^[ ]*$/d" fichier.txt
  31. 33) sed -n -e "/^os/s/\(^os[^:]*\):x:\([^:]*\):/\2:x:\1:/gp" /etc/passwd
  32. 34) sed -n -e "/^osms[^:]1:/p" | cut -d: f1,3,5 | sed -n "/^./s/^\(.*\),,,$/\1/p"
  33. 35) sed 'y/éèàù/eeau/' fichieraccents.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement