Tag cloud

JBoss (16) Fedora (5) Linux (4) Red Hat (4) JON (3) command line (3) 4.3 (2) JEE (2) JVM (2) Java (2) KVM (2) Oracle (2) Portal (2) Weblogic (2) installation (2) vs (2) /boot partition (1) Add-ons (1) Apache (1) Bundles (1) Business model (1) Byteman (1) CLASSPATH (1) EAP (1) EPP (1) Eclipse (1) Failover (1) Gnome (1) JAVA_OPTS (1) JBDS (1) JBoss Tools (1) JBossON (1) JConsole (1) JDK (1) JMS (1) JVM options (1) KDE (1) MBean (1) Network (1) Open Source (1) RHQ (1) Red Hat subscription (1) Thunderbird (1) Troubleshooting (1) Virtulization (1) WS (1) Webservices (1) Wireshark (1) classloading (1) clustering (1) comparison (1) debug (1) deployment (1) disable SELinux (1) disksize (1) error (1) fun (1) jboss.org (1) log (1) log4j (1) lvm (1) messaging (1) multiple WARs (1) patent FOSS (1) performance tuning (1) provisionning (1) scripting (1) services (1) switch (1) troll (1) upgrade (1) video (1) war (1) webapp (1) yum (1)

24 August 2010

My useful Linux commands

Some Linux commands I find useful:

Replace a string in all files recursively usind sed ( replaces repository.jboss.com with anonsvn.jboss.org/repos/repository.jboss.org)

grep -rl repository.jboss.com . | xargs sed -i 's/repository.jboss.com/anonsvn.jboss.org\/repos\/repository.jboss.org/'

Add launchers (*.desktop, icon - comment - name) here
/usr/share/applications


Find a file on the file system
updatedb
locate test.xml




Find out which kernel you are using
uname -r

Find string "proxy" in all files
sudo find . -type f -name "*" -exec grep -l "proxy" {} \;

find . -name "*" -exec grep "proxy" {} \;      (donne tous les lignes avec Test_1)
find . -name "*" -exec grep -l "proxy" {} \ ; (donne tous les fichiers avec Test)

grep -r 'proxy' *

Making a script executable
chmod +x

Finding all my files with string "myfile" including soft link references directories
find . -user me -name *myfile* -follow


Displaying directory structure
ls -rtl bbb (-R subdirectories)


Monitoring changes within a file
tail -100 fichier
tail -f file (monitoring)

grep -F ‘abc efg’ (Leerstelle = OR)
grep -i -n (line number) testChar file.txt

grep « VALOTRACE= » `(Alt + Shift + 7) find .`


cat fichier | grep blub
Displays full path of file being executed
which java

grep valopurgesolde.x communs/ces/x (pour voir qu’est-ce que le processus fait)
kill -9 -1 (killt das zuletzt angemeldete Konto)
cd - (go to root)
du -sk . (Wie viel Speicherplatz belegt)
df -k (kilo) . (combien il reste sur le filesystem)
ps -u valqua11  (kill -9 #1 #2)

ln -s link name (ln -s ${HOME}/brackmann roli)
Displaying all exports of the shell
typeset
Process keeps on running in background even when the executing shell is killed
nohup your_command


Gets the 4th columns of the server.log and deletes all the doubles


cat server.log | awk '{ print $4; }' | sort -u > server4thcolumndistinct.log


Deletes all temporary files followed by '~'
find ./ -name '*~' | xargs rm

No comments:

Post a Comment