Linux Command Line

List of Linux commands I should be remembering. But I’ll forget them tomorrow, so I present myself: Le Lists.

Batch Scripts

  • echo “some text”: Will display the text on screen
  • read variable: Will read user input which is stored in $variable (best used in combination with “echo”). To use the variable, write $variable, E.G /home/itsme/$folder/
  • if [ argument]; (code); fi: Use an “if” function in your shell script. End the condition with “fi”

Command Line

  • wget URL: Download file to folder you’re currently in
  • wget -P /path/on/server URL: Download file(s) to the specified folder.
  • unzip /path/to/file -d /where/to/unzip/to: Unzip the chosen file to a directory you choose
  • mv /some/file . : Move to folder you are currently in.
  • ls-la :Listalle files in een folder.
    • ls -lah: See above, but file size is now shown in a human readable format.

Archiving / Unarchiving

  • tar-zcvf (file.tar.gz) (folder):Compressie van folder enbestanden.
    • z: zip, c: compress, v: verbose (toon vooruitgang), f: folder naam
  • tar -xf (file.tar.gz): Pak alle bestanden uit tar uit
  • unrar x (filenaam): Pak alle bestanden, inckusief paden van .rar bestand uit

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.