LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-17-2019, 05:34 AM   #121
Arch59
LQ Newbie
 
Registered: May 2019
Location: The Netherlands
Distribution: Xfce running on Arch-Linux
Posts: 3

Rep: Reputation: Disabled
Smile Return Information About Installed Packages


Return Information About Installed Packages

If you want to know the name, description and all other manner of details about a package use the following command:

Code:
pacman -Q -i packagename
 
Old 06-17-2019, 11:49 AM   #122
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 467

Rep: Reputation: 21
Quote:
Originally Posted by typewar View Post
The shortest command I know:

Code:
> filename
It simply clears a file
I also often use '>' to leave notes in dirs referring to particular files, so I can read them directly in mc (or other file manager), e.g.
Code:
>'Bitter mplayer does not play this properly'
and mc lists the contents of the directory so
Quote:
| Bitter mplayer does not play this properly │ 0│Jun 17 09:43│
│*Bitter.Lake.2015.WEBRiP.x264.mkv │ 2344M│Feb 1 09:20│
 
Old 06-21-2019, 01:33 PM   #123
UCotter
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
sudo !!
 
Old 06-22-2019, 01:04 PM   #124
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 467

Rep: Reputation: 21
Nesting expansions, substitutions etc in Bash

While bash is somewhat limited in this respect, I find the following very useful to randomly or specifically select a single file from many:
Code:
mapfile -t <<< "$(ls *.mp3)" f
play ${1:-${f[$((RANDOM%${#f[@]}))]}}
 
Old Yesterday, 02:28 PM   #125
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,892

Rep: Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807
Install httpie and add a shell command (alias/function/script) called "dl" that just calls "http --download" with any provided arguments.

Then you can do:

Code:
dl https://url/to/file.tar.bz2
Much better than either wget or cURL.

Last edited by dugan; Yesterday at 06:09 PM.
 
1 members found this post helpful.
Old Yesterday, 02:38 PM   #126
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 9 Stable (Stretch) x64
Posts: 3,458

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
Question

Quote:
Originally Posted by dugan View Post
Install httpie and add a shell command (alias/function/script) called "dl" that just calls "httpie --download" with any provided arguments.

Then you can do:

Code:
dl https://url/to/file.tar.bz2
Much better than either wget or cURL.
Hi dugan. How is it better?
 
Old Yesterday, 02:40 PM   #127
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,892

Rep: Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807Reputation: 3807
Quote:
Originally Posted by linustalman View Post
Hi dugan. How is it better?
For one thing, it handles redirection properly by default. No need to add the "--content-disposition" flag that you'd need for wget.

The progress meter also looks much more cool.
 
1 members found this post helpful.
Old Yesterday, 02:41 PM   #128
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 9 Stable (Stretch) x64
Posts: 3,458

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
Thumbs up

Quote:
Originally Posted by dugan View Post
For one thing, it handles redirection properly by default. No need to add the "--content-disposition" flag that you'd need for wget.

The progress meter also looks much more cool.
I see, thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: What is your favorite Linux terminal trick? LXer Syndicated Linux News 0 08-01-2018 12:41 PM
Poll: (Without the poll) - How is Linux used in your workplace? SlowCoder General 13 09-11-2007 11:03 PM
vim :gui trick and undo-trick dazdaz Linux - Software 3 09-10-2007 02:45 PM
Poll: What is your favorite brand of Motherboard? dstrbd1 Linux - Hardware 2 02-16-2006 05:40 PM
Weekly Hardware Poll, Dec 14th: What's your favorite notebook? finegan Linux - Hardware 18 12-03-2004 12:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration