DEV Community

Ibrar Hussain
Ibrar Hussain

Posted on

2 1

Useful Commands for Ubuntu

Following are the handy/useful list of commands & usage that we need from time to time.

Table Of Contents

Curl

  • Download a remote file
curl -O [URL]
Enter fullscreen mode Exit fullscreen mode

Or

curl –-remote-name [URL]
Enter fullscreen mode Exit fullscreen mode

An example would be:

curl -O https://en-au.wordpress.org/latest-en_AU.zip
Enter fullscreen mode Exit fullscreen mode

Or

curl –-remote-name https://en-au.wordpress.org/latest-en_AU.zip
Enter fullscreen mode Exit fullscreen mode
  • To save a remote file with a different name:
curl –O [FILENAME] [URL]
Enter fullscreen mode Exit fullscreen mode
  • Download multiple remote files
curl -O [URL1] -O [URL2]
Enter fullscreen mode Exit fullscreen mode
  • Download a remote file via FTP
curl -O [FTP_URL]
Enter fullscreen mode Exit fullscreen mode
  • Download remote files via FTP with credentials
curl -u [FTP_USER]:[FTP_PASSWORD] -O [FTP_URL]
Enter fullscreen mode Exit fullscreen mode

Wget

  • Download a remote file
wget [URL]
Enter fullscreen mode Exit fullscreen mode
  • Download a remote file with a different name
wget -O [FILENAME] [URL]
Enter fullscreen mode Exit fullscreen mode
  • Download a remote file via FTP
wget [FTP_URL]
Enter fullscreen mode Exit fullscreen mode
  • Download files via FTP with credentials
wget -u [FTP_USER]:[FTP_PASSWORD] -O [FTP_URL]
Enter fullscreen mode Exit fullscreen mode

Unzip

  • Test if a zip file is valid file
unzip -t [ZIP_FILE_PATH]
Enter fullscreen mode Exit fullscreen mode

An example would be:

unzip -t ./test.zip
Enter fullscreen mode Exit fullscreen mode
  • List contents of a zip file
unzip -l [ZIP_FILE_PATH]
Enter fullscreen mode Exit fullscreen mode
  • Extract a zip file
unzip [ZIP_FILE_PATH]
Enter fullscreen mode Exit fullscreen mode
  • Extract a zip file to a different location/directory
unzip [ZIP_FILE_PATH] –d [DESTINATION_DIRECTORY_PATH]
Enter fullscreen mode Exit fullscreen mode

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs