Difference between revisions of "Perintah Linux S"
Jump to navigation
Jump to search
Gibransyah (talk | contribs) |
Gibransyah (talk | contribs) |
||
Line 52: | Line 52: | ||
# Tambahkan kata "CASCADE" untuk setiap baris yg diawali oleh kata "DROP" dan diakhiri karakter ";" | # Tambahkan kata "CASCADE" untuk setiap baris yg diawali oleh kata "DROP" dan diakhiri karakter ";" | ||
− | Isi file <code>drop.sql</code> | + | ''Isi file <code>drop.sql</code>'' |
DROP TABLE petruk_line_produksi; | DROP TABLE petruk_line_produksi; | ||
DROP TABLE petruk_kapasitas_produksi; | DROP TABLE petruk_kapasitas_produksi; | ||
DROP TABLE petruk_status_mutasi; | DROP TABLE petruk_status_mutasi; | ||
DROP TABLE petruk_statusnc; | DROP TABLE petruk_statusnc; | ||
− | DROP TABLE petruk_tindakannc; | + | DROP TABLE petruk_tindakannc;<br> |
− | + | $ sed -i '/^DROP/s/;$/ CASCADE;/' mytable.sql<br> | |
− | $ sed -i '/^DROP/s/;$/ CASCADE;/' mytable.sql<br> | ||
− | |||
''Output'' | ''Output'' | ||
DROP TABLE petruk_line_produksi CASCADE; | DROP TABLE petruk_line_produksi CASCADE; |
Revision as of 11:24, 10 April 2013
Indeks - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z
sane-find-scanner
scanadf
scanimage
scp
screen
script
sdiff
sed
stream editor for filtering and transforming text
Sintaksis Sed
$ sed 'ADDRESSs/REGEXP/REPLACEMENT/FLAGS' nama_berkas $ sed 'PATTERNs/REGEXP/REPLACEMENT/FLAGS' nama_berkas
# s is substitute command # / is a delimiter # REGEXP is regular expression to match # REPLACEMENT is a value to replace
FLAGS can be any of the following # g Replace all the instance of REGEXP with REPLACEMENT # n Could be any number,replace nth instance of the REGEXP with REPLACEMENT. # p If substitution was made, then prints the new pattern space. # i match REGEXP in a case-insensitive manner. # w file If substitution was made, write out the result to the given file. # We can use different delimiters ( one of @ % ; : ) instead of /
- Tambahkan kata "CASCADE" untuk setiap baris yg diawali oleh kata "DROP" dan diakhiri karakter ";"
Isi filedrop.sql
DROP TABLE petruk_line_produksi; DROP TABLE petruk_kapasitas_produksi; DROP TABLE petruk_status_mutasi; DROP TABLE petruk_statusnc; DROP TABLE petruk_tindakannc;
$ sed -i '/^DROP/s/;$/ CASCADE;/' mytable.sql
Output DROP TABLE petruk_line_produksi CASCADE; DROP TABLE petruk_kapasitas_produksi CASCADE; DROP TABLE petruk_status_mutasi CASCADE; DROP TABLE petruk_statusnc CASCADE; DROP TABLE petruk_tindakannc CASCADE;
sendmail
sensors
seq
setfdprm
setkeycodes
setleds
setmetamode
setquota
setsid
setterm
sftp
sh
shutdown
restart atau shutdown komputer
shutdown -h now Mematikan komputer shutdown -r now Merestart komputer
sha1sum
showkey
showmount
shred
shutdown
size
skill
slabtop
slattach
sleep
slocate
snice
sort
split
ssh
Login ke dalam remote machine
- Login ke alamat ip 8.8.8.8 sebagai user petruk
ssh petruk@8.8.8.8
ssh-add
ssh-agent
ssh-keygen
ssh-keyscan
sshd
stat
statd
strace
strfile
strings
strip
stty
su
sudo
Digunakan agar pengguna biasa dapat menjalakan perintah dengan security privilege milik pengguna lain (biasanya sebagai superuser/root)
- Hapus direktori document di
/home/alif/document
secara rekursif
sudo rm -rf /home/alif/document
- Jalankan perintah terakhir sebagai root
sudo !!