[SOLVED] Create a launcher with rm command

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
artik
Level 1
Level 1
Posts: 44
Joined: Sat Feb 23, 2013 9:13 am

[SOLVED] Create a launcher with rm command

Post by artik »

Hi,

I have on my desktop a folder called temp, that i would like to clean with one click or using a keyboard shortcut. My command is really simple, and no needs root rights :

Code: Select all

rm /home/artik/desktop/temp/*
The problem is I tried 2 different ways. Creating a launcher (with and without "open in a terminal") with this command, and using the mint custom keyboard shortcuts. In both cases, it doesn't work. Could someone try to help me to do it ?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Create a launcher with rm command

Post by altair4 »

artik wrote:I have on my desktop a folder called temp, .....

Code: Select all

rm /home/artik/desktop/temp/*
Then point your command to that location:

Code: Select all

rm /home/artik/Desktop/temp/*
There is no such place as /home/artik/desktop.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
artik
Level 1
Level 1
Posts: 44
Joined: Sat Feb 23, 2013 9:13 am

Re: Create a launcher with rm command

Post by artik »

I renamed my Desktop in desktop.
In a terminal, my command line is working, not with a launcher
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Create a launcher with rm command

Post by altair4 »

Why on earth would you rename .... never mind.

Change your launcher command to this:

Code: Select all

bash -c 'rm /home/artik/desktop/temp/*'
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
artik
Level 1
Level 1
Posts: 44
Joined: Sat Feb 23, 2013 9:13 am

Re: Create a launcher with rm command

Post by artik »

Amazing altair4, it works now ! thx !
Locked

Return to “Cinnamon”