User Tools

Site Tools


Contents Page

Linux Commands

Installing a GPG key


   wget -O- | sudo gpg --dearmor | sudo tee /usr/share/keyrings/jcameron-key.gpg > /dev/null 2>&1 

Then need to edit the sources.list file to look something like:

   deb [signed-by=/usr/share/keyrings/jcameron-key.gpg] sarge contrib

Change permissions for whole directory structure

For directories:

  find /desired_location -type d -print0 | xargs -0 chmod 0755

For files:

  find /desired_location -type f -print0 | xargs -0 chmod 0644

Adapt as required.

Delete all files with given pattern

   find . -name '*altauserpoints*' -print0 | xargs -0 -P0 rm

Adapt as required.

Make a change in every file in a directory

   sed -i 's/foo/bar/g' *

To make the change through a whole directory tree:

   find ~/public_html/my_website/pages -type f -exec sed -i 's/2017/2018/g' {} \;

Search within specific file type

   grep -ir removed --include="*.txt" .

will search files with extension .txt ignoring case (-i)


Using this from the command line seems to do more than the GUI:


Limiting journal log size

Edit the file:


and set SystemMaxUse, for example

useful/linux-commands.txt · Last modified: 2024/07/11 10:40 by admin