teleren/devto huggingface dataset:
How to get the tag name of an element using JavaScript?
Tags: javascript
Published: 2020-10-10 00:00:00

---
  title: How to get the tag name of an element using JavaScript?
  published: true
  tags: JavaScript
  date: Sat Oct 10 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/tag-name-of-dom-element-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-59cdef6f725e5ace3eed947b8f34a7d7.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/tag-name-of-dom-element-javascript)
  
To get the tag name of a DOM element in JavaScript, you can use the

```bash
tagName
```

property in the element in JavaScript.

Consider this `article` tag with some content inside it,

```html
<article id="myArticleSection">
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vitae
  mauris et arcu lobortis semper eget convallis enim. Sed at lorem in dolor
  ultrices feugiat. Donec elementum at erat vitae pellentesque. Quisque laoreet
  purus vitae felis porta, quis gravida odio condimentum. Donec faucibus
  porttitor dui, nec efficitur nisi luctus eget.
</article>
```

Now to get the element name, let's use the `tagName` property like this,

```js
// get reference to the article tag
const element = document.querySelector("myArticleSection");

// get the name of the tag
// using the tagName property
const elementName = element.tagName;

console.log(elementName); // ARTICLE
```

- The property returns the name of the tag as a string and also in CAPITALISED letters.
  eg: If it is an `img` tag then the property will return `IMG`.

### Feel free to share if you found this useful 😃.

---
Straight Outta VCS
Tags: vcs, deployment, git
Published: 2020-10-02 18:59:36

---
title: Straight Outta VCS
published: true
description: Is it really a sin to run production code from a VCS working copy?
tags: #vcs #deployment #git
//cover_image: https://direct_url_to_image.jpg
---
I run my production software from production branch, working copies.  I have been told many times that this is a grave sin. Yet, I have been doing this for over six years in my current gig (out of twenty-eight years as a professional), which includes scores of deployments to production and hundreds to stage, without a single problem related to this practice.

At my most previous job, I was required to export from our VCS (initially svn and then git) to generate the executable production copy. All this seemed to do was to add extra steps to deployment, making more room for mistakes or things to break. It also made hot fixes that required work on the production platform (for example, as the very last resort when the error cannot be replicated anywhere else) frustrating and unnecessarily complex right during the middle of a time when developers or devops need be the least distracted. 

The only argument I've encountered against this practice that was even slightly compelling to me is that I might mistakingly deploy updates from that branch. Well, what if I were to mistakenly do anything? I can do a lunkheaded export from git just as easily as I can do a lunkheaded update from git. From what I can see, rolling back, moving among branches, etc., are far easier to intentionally accomplish with my scheme and yet no more or less as error prone than any other scheme. After all, I do not merge into my production branch until stringent testing and multiple sign-offs have been collected through dev and stage.

What do you think?

Allow me to finish by saying that I'm not intending this to be a discussion that intersects this question with the larger topic of deployment strategies, such as using things like Docker or various forms of CI, and so on. We're just talking VCS, keeping it simple and focused.

Thanks for taking a look.
Tailwind CSS - Fluid Width Video
Tags: tailwindcss, css, youtube, cheatsheet
Published: 2020-10-11 14:54:11

---
title: Tailwind CSS - Fluid Width Video
published: true
date: 2020-10-10 00:00:00 UTC
tags: tailwind, css, youtube, cheatsheet
canonical_url: https://sung.codes/blog/2020/10/10/tailwind-css-fluid-width-video/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/knod7yk0ayv22kqf0rod.jpg
---

## Introduction

Learned how to make YouTube videos from this CSS Tricks article, [Fluid Width Video](https://css-tricks.com/fluid-width-video/).

The following code snippet is a Tailwind CSS version of [&lt;iframe&gt; Video (YouTube, Vimeo, etc.)](https://css-tricks.com/fluid-width-video/#iframe-video-youtube-vimeo-etc) section.\_

## Fluid Width iFrame Video

1. Add a wrapper element with following classes

   1. [relative](https://tailwindcss.com/docs/position#relative)
   2. A Tailwind CSS `padding` extension
      ```js
      module.exports = {
        purge: [...],
        theme: {
          extend: { padding: { "fluid-video": "56.25%" } },
        },
        variants: {},
        plugins: [],
      }
      ```
   3. Remove the wrapper height with [h-0](https://tailwindcss.com/docs/height#app).

2. Position `iframe` with an [absolute](https://tailwindcss.com/docs/position#absolute) positioning on [top left](https://tailwindcss.com/docs/top-right-bottom-left#app) (`top-0`, `left-0`), with 100% [width](https://tailwindcss.com/docs/width#app) and [height](https://tailwindcss.com/docs/height#app) (`w-full`, `h-full`).

```jsx
<div id="responsiveVideoWrapper" className="relative h-0 pb-fluid-video">
  <iframe
    className="absolute top-0 left-0 w-full h-full"
    src="https://www.youtube.com/embed/zihoyz0u_cs"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
    allowFullScreen
  ></iframe>
</div>
```

---

Image by <a href="https://pixabay.com/users/skitterphoto-324082/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1017451">Rudy and Peter Skitterians</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1017451">Pixabay</a>
CustomElement in Mithril
Published: 2020-10-09 21:18:11

Let's create a customElement with my favorite framework.
It's not well written, but it's late :-)

You can test it here [RandomUsers](https://flems.io/#0=N4IgtglgJlA2CmIBcBWAjAOgAwHYA0IAzgMYBOA9rLMgNpZ4BMDAbAMwC6BAZhAobaAB2AQzCIkIDAAsALmGoFi5QTPgrkIADqCAPKWGCo5MAFoAroXilCAAiVmVAXjQA+HQHp9h4+cvWX2tp6BkamFla29k6sbp4hPuH+gbpeob4RduQOMo4osakJfoQBgto2IAC+eEKi4pIAVvyKyqrqEggyNoQyAJ4IAOLCVFY9No42NsBlNlAQhAAOsMKjSJogXAgAHmt40xvwmwDq+vM2SDZrAO4nOxeCE-UWMhBcPQDCLWqd52sLwsTwEzCCgOKBrCrJDo2ACqRTGNi4DmIz2UNgAFMBhDIZNYkMAojIKhUAJQTKb3GxQxK2cY0djTKGkeAARzM8G68IABtMJrIZPNCEh3HFvGBEhgxO5hPMIO4APxMwhmWAyQiOAAk+KyKghFO5FKZMjMpHu5ImEwgggg3xsYAwTNZ7JkaIdbO6xIwMikajRaKgpMcLkmPPN1PhUHt7OVqpDJN2FImADcIPBLuc0QGgzQQxMwGi1rNEztgN0+vAzl1egMhghSD0qndzU2bNSJdLfWZM7n8yBC7cbDRm42h+a82sIGAAOa3EukYgVswYGXI43wDBLUiT+BxnPNse9iCJjAiMQz0sICvAVSbGQAQVgEEnglWIABKis4IbE13Q8XJ7XPDWJ0ADUFwgGBNigX+tTrsI7q7uwxJISG9KCESyTEEshC2AAMnMMiwhkBytFAtgABIACoALI4QAoggYgqMGFJKII3SkGYyLkKQGbMU2SrzFYGYANzDhMXpzBgBLwmgWBYNMuoTKxgjwMi8BQG8NYAEb-AA1rxZq5hK2rOhJhB4GSIbJqm6ZdrueaEdYFlatk6ZmRgW53tipAQFpZiqGiADkBKBaSAA+YU2O5BKkrGxIkgp2i6tolyWkYlxSU8xj0fAjGqhgUDwDwKlBQUYRFIFFl4d0jmEMSwnJCABCWAgyIQMo-ASGgAAsSBoGglTVCA-4aFJ2FNa+nxtJI-58alUBeucaAMAAHPMmyiWUYDApOlomFp5DYsY5ysFg60NWhyTHrUSCAd0JgdKopB8ea14yCYOIGIQXDcWASDENK1pDBAABe8AXU2SUTS1qkomxGgMH1K2VJwIAPoIumdTQNRiBokBej5CggMa1ASHyApCu4DjzLpk5ScY7j41IhMAAKYJgzCM9azO8BgjQTb0gkaCQPnzDIg043UxBZaY8AMV8TTE6QpMgOTgrCtTtP02A7gs5c8BaUoYDzMoCvuNL3Q+HLuUK2zGAMBg3XmzLJjW3lhASpafOK4LdQixAYvQ9bbUdRoK19awKMVEAA)


```html

<random-users count=1></random-users>

<random-users count=3></random-users>

<random-users count=5></random-users>
```


```js
let styleGallery =  {
  display :"flex",
  flexWrap : "wrap", 
  justifyContent : "space-around"}

let Users = function ({attrs:{count}})  {
  let users = []
  let request = `
    https://randomuser.me/api/?results=${count}
  `
  return {
    init : m.request(request).then((d) => {
      users = d.results
    }),
    view: () => [
      m("div",{style : styleGallery}, 
        users.map((u) =>  m("div",  [      
          m("img", {src : u.picture.large}),
          m("div.name", {style : {textAlign:"center"}},   
            u.name.first + " " + u.name.last)
      ])))
    ]
}}

class ListUsers extends HTMLElement {
  constructor() {
    super(); 
    this.count = 100
  }
  connectedCallback() {
   m.mount(this,  {
    view: () => 
      m(Users, {count: (this.getAttribute('count') || this.count) 
    })})
  }
}

window.customElements.define('random-users', ListUsers);

```
Day 235: Trial and Error
Tags: hiphop, code, coding, lifelongdev
Published: 2020-10-09 22:59:11

_liner notes_:
- Professional : Pretty good way to end the week. Had a meeting with the team to catch up and plan for next week. I'm off except for Monday when I help out with the live stream. Did some more prep work for the show on Monday.

- Personal : Finally got the library to work! The issue was with my private key. I want to store in my database to be accessed by the server so I could change it if I need to without storing it as an environment variable and have to change it and deploy the application again. Who knows when and if that would happen. I would have to pull down my code, set the environment variable and deploy it again. So one issue was that I had an error in the name I chose for the private key and the other was how the private key was formatted. Apparently, I had to replace the return characters with '\n' and make everything fit on a single line. A whole lot of trial and error. haha Looks like I got it working. After that, I listened through so tracks for the radio show.

![Overhead shot of the shore of The Dead Sea, Israel with its green water](https://dev-to-uploads.s3.amazonaws.com/i/yl3evkhhaevz30e30gau.png)

Going to finish up the pre radio show work. It's not too much since I got a lot done last week. After that, I want to get the chat and ask questions section done for the host dashboard. Once that's working, I want to get it working for the front end this weekend. Also, going to watch the final episode of "The Boys" second season tonight.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube j67Nu5LNwrg %}
Object Destructuring with ES6
Tags: javascript, practice, es6, coding
Published: 2020-10-09 22:07:56

This week I am focusing on object destructuring with ES6. I was first introduced to object destructuring while a student at the Flatiron School during our module on React. Object destructuring is something I use almost daily, especially as a React developer, and I would like to take this opportunity to share how it works with you. So, without further ado, let's dive in. 

Destructuring JavaScript objects is similar to destructuring JavaScript arrays. It allows us to pull multiple values at a time, and to store each of those values inside their own variable. To fully appreciate how useful this is, I think it might be helpful to look at the old way of pulling values from objects and assigning them to their own variables. Let's say we have an object that contains these key/value pairs:
```
const dog = {
  name: 'Doug',
  age: 4,
  breed: 'Pug',
  temperament: 'friendly'
};
const name = dog.name;
const breed = dog.breed;
```
Depending on how large the object is, this could get really old really fast. Thanks to ES6 destructuring we can create multiple variables from the information contained inside of an object on a single line. To create the name and breed variables from our dog object we simple write this statement:
```
const { name, breed } = dog;
```
You can also assign a default value to the variable when the property of an object doesn’t exist. For example:
```
const dog = {
  name: 'Doug',
  breed: 'Pug',
  temperament: 'friendly'
};

const { name, age = 'unknown', breed } = dog
```
Since there is no age key/value pair inside the dog object, were we to log age to the console we would get back the string, "unknown".

In my opinion, the true power and usefulness of object destructuring is made apparent when you have to deal with the kind of nested data that you get back from a JSON API. 
```
const dog = {
  name: 'Doug',
  breed: 'Pug',
  age: 4,
  temperament: 'friendly',
  links: {
    social: {
      twitter: 'https://twitter.com/dougthepug',
      instagram: 'https://instagram.com/realdougthepug',
    },
    web: {
      blog: 'https://dougthepug.com'
    }
  }
};
```
Let's say that we only want to grab the social media links from this nested object. To achieve this with destructuring we simply write:
```
const { twitter, instagram } = dog.links.social;
```
The url for each account is now stored inside the variables twitter, and instagram. Again destructuring is super useful if you are a front-end developer. 

I hope this has been useful. I plan to dive more deeply into JavaScript objects in future posts.

Happy coding!
Week 2: Forem Hacktoberfest Twitch Events Recap
Tags: hacktoberfest, opensource, meta
Published: 2020-10-09 21:42:29

---
title: Week 2: Forem Hacktoberfest Twitch Events Recap
published: true
description: 
tags: hacktoberfest, opensource, meta
series: ThePracticalDev Twitch Events recap
---
This week the Forem team hosted four streams on Twitch during Hacktoberfest. Here is a recap of what we discussed!:

## Monday, Oct 5th: Gratitude Stream.
{% youtube NhoQo7nVVds %}
[Nick Taylor]([https://dev.to/nickytonline) introduced [me](https://dev.to/coffeecraftcode) as the Open Source Community Manager at DEV. 
We gave shoutouts to DEV community members who contributed to Forem last week. 
{% link https://dev.to/devteam/hacktoberfest-week-two-thank-you-to-our-contributors-on-forem-456i %}

## Tuesday, Oct. 6th: A11y talk hosted by Raise.dev:
{% youtube OIsdTuopHJM %}
Nick Taylor and I joined [raise.dev](https://raise.dev/) to talk about accessibility. Nick shared his knowledge by live-coding on an open [Forem accessibility](https://github.com/forem/forem/issues/1153) issue. He walked us through how to provide content skip links for users and where they could be applied in DEV. 

## Wednesday, Oct 7th: Walkthrough Wednesday.
{% youtube GHiUOuASv2g %}
Nick Taylor was joined by special guest DEV community member [Bekah Hawrot Weigel](https://dev.to/bekahhw). 
Nick walked Bekah through the frontend architecture of Forem.  

## Thursday, Oct. 8th: Pair Programming with Eliot.
{% youtube LBDqggawwNE %}
Nick Taylor and I were joined by DEV community member [Eliot Sanford](https://techieeliot.com/). Nick and Eliot pair programmed on an open [Forem accessiblity](https://github.com/forem/forem/issues/4807) issue. This is a great open issue that works to prevent heading level errors in our Markdown editor. 

Thanks to all our viewers who joined the streams and chatted with us this week! We look forward to seeing you again next when we are joined by Forem team members [Arit Amana](https://dev.to/msarit), [Lisa Sy](https://dev.to/lisasy), and community member/ Twitch streamer [Rachael Wright-Munn](https://www.twitch.tv/ChaelCodes).

Keep an eye on [ThePracticalDev Twitch](https://www.twitch.tv/thepracticaldev) channel for our streaming schedule. 
P.S. If you’re curious about the open Forem issues you can contribute to, check out this post:
{% link https://dev.to/devteam/contribute-to-forem-this-hacktoberfest-5cjj %}

P.P.S. Want a refresher on some Hacktoberfest rules, tips, and advice from DEV? Don’t miss this post:  
{% link https://dev.to/devteam/happy-hacktoberfest-here-s-how-to-show-up-for-open-source-this-month-4cee %}
Write an Attractive Blog Post Title in Under 4 hours.
Tags: meta
Published: 2020-10-09 21:39:03

Excuse the satire but my value proposition got your attention didn't it? Hello you are reading this 😊.

Before we begin, I'd like to explain that I'm trying not to wake up my son who isn't feeling so well, so I'm sitting on the floor, in the dark, quiet 🐀 as a mouse, trying to think of something to do.

I want to blog about something small that way when I get out of here in about 4 hours I can read your feedback and ideas. 

So here goes, the secret to non click bait post titles. 

How to do **X** in **Y** time.

How to Escape a Babies Room in 5 Minutes or Less.

See it's interesting right?
Oh yeah also I have posted about this one before, shouting case, not everyone likes it, for me it's a red flag. You could use title case for titles, otherwise you'll wake up my son and I won't get any sleep 😳
My #100DOC - Day 44
Tags: 100daysofcode, challenge
Published: 2020-10-09 21:36:59

### Day 44: October 09, 2020

#### **Today's Progress**: 
1. **[Continued with Confección y Publicación de Páginas Web Course](https://github.com/pablohs1986/confecci-nYpublicaci-nDeP-ginasWeb_SEPE)** (1h):<br>I continued with some basic CSS exercises.
    
#### **What I learned**: 
* Review of basic CSS concepts.

#### **Total time**:
1h.
My #100DOC - Day 43
Published: 2020-10-09 21:36:34

### Day 43: October 08, 2020

#### **Today's Progress**: 
1. **[Continued with Confección y Publicación de Páginas Web Course](https://github.com/pablohs1986/confecci-nYpublicaci-nDeP-ginasWeb_SEPE)** (1h):<br>I started the second part of the course with some basic CSS exercises.
    
#### **What I learned**: 
* Review of basic CSS concepts.

#### **Total time**:
1h.
My #100DOC - Day 42
Tags: 100daysofcode, challenge
Published: 2020-10-09 21:36:13

### Day 42: October 07, 2020

#### **Today's Progress**: 
1. **Setting up my old MacBook** (1h):<br>Today I spent some time setting up my old MacBook, installing my tech stack and some cool things like ZSH shell.
    
#### **What I learned**: 
* Install XCode.
* Setting up ZSH and Oh my ZSH!
* Setting up a MacOS system for development.

#### **Total time**:
1h.
My #100DOC - Day 41
Tags: 100daysofcode, challenge
Published: 2020-10-09 21:35:47

### Day 41: October 06, 2020

#### **Today's Progress**: 
1. **[Redesign of my portfolio](https://github.com/pablohs1986/pablohs1986.github.io)** (1h):<br>Working on works section. Studying some Bootstrap Grid concepts.
    
#### **What I learned**: 
* Bootstrap Grid concepts.

#### **Total time**:
1h.
My #100DOC - Day 40
Tags: 100daysofcode, challenge
Published: 2020-10-09 21:35:21

### Day 40: October 05, 2020

#### **Today's Progress**: 
1. **[Redesign of my portfolio](https://github.com/pablohs1986/pablohs1986.github.io)** (1h):<br>Working on works section. Studying some Bootstrap Grid concepts.
    
#### **What I learned**: 
* Bootstrap Grid concepts.

#### **Total time**:
1h.
Share images with other applications with callbacks -> Android Kotlin Library
Tags: android, kotlin, coroutines, libraries
Published: 2020-10-09 21:07:09

[Share-Em](https://github.com/EsmaeelNabil/Share-em)

An `Image` & `Text` Sharing library for Android backed by Kotlin Coroutines. `Share` is: 


- **Fast**: `Share` performs it's operation in `Background Thread` using `Coroutines`.
- **Lightweight**: `Share` adds ~10 methods to your APK (for apps that already uses Coroutines).
- **Easy to use**: `Share's` API leverages Kotlin's language features for simplicity and minimal boilerplate.
- **Modern**: `Share` uses Coroutines.


## Implementation

`Share` is available on `jitpack`.

### Gradle
Add below code to your **root** `build.gradle` file (not your module/app build.gradle file).

```gradle
allprojects {
    repositories {

    ....

	maven { url 'https://jitpack.io' }
	
    }
}
```
And add a dependency code to your **APP**'s `build.gradle` file.
```gradle
dependencies {

	  implementation 'com.github.EsmaeelNabil:Share-em:1.0.7'

}
```

## Usage

### Simple usage 
- Only share the Image
``` kotlin
Share.with(context = this)
            .item(SharableItem(pictureUrl = "ImageUrl"),
                onStart = {},
                onFinish = { isSuccessful, errorMessage -> })
```


- Only share A Text
``` kotlin
Share.with(context = this)
            .item(SharableItem(data = "Text To Share"),
                onStart = {},
                onFinish = { isSuccessful, errorMessage -> })
```

### More Specific Example
``` kotlin

Share.with(context = this).item(SharableItem(
        pictureUrl = "https://images.unsplash.com/photo-1554290712-e640351074bd?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=965&q=80",
        data = "body text",                       //default = ""
        shareAppLink = false,                    // don't generate appliaction playstore `download our app` message with the data text. default = false
        downloadOurAppMessage = "Find us here"  // A custom message for AppLink sharing feature
    ),

        onStart = {
            // do something onStart like : Loading
            Log.e(TAG, "Sharing Started.")
        },

        onFinish = { isSuccessful: Boolean, errorMessage: String ->

            // if isSuccessful : you will see an intent chooser
            // else            : check the error message

            if (isSuccessful)
                Log.e(TAG, "Successfully shared")
            else
                Log.e(TAG, "error happened : $errorMessage")

        }
    )

```

## Tips
-  if `pictureUrl = "ImageUrl"` is not a `valid` URL you will be sharing only the `data` text.
-  if `downloadOurAppMessage  is provided and `shareAppLink` is false it will be ignored.
SFTP Basic Commands
Published: 2022-08-16 21:11:00

---
title: SFTP Basic Commands
published: true
date: 2020-10-09 20:58:17 UTC
tags: 
canonical_url: https://blog.livialima.net/sftp-basic-commands
---

 **SSH File Transfer Protocol** (also Secure File Transfer Protocol, or SFTP) is a network protocol that provides file access, file transfer, and file management over a secure channel, such as SSH.

## Connect

Enter the **username** and remote **hostname** or IP address at the command prompt. Once authentication successful, you will see a shell with an `sftp>` prompt.

```
[user@computer1 ~]$ sftp demo@192.168.1.2
demo@192.168.1.2's password:
Connected to demo@192.168.1.2.
sftp>

```

When using a SSH identity file (private key) for public key authentication:

`sftp -i keypair.pem demo@192.168.1.2`

## Check current directory

**lpwd** print the current directory on your _local_ system

```
sftp> lpwd
Local working directory: /home/livia
sftp>

```

**pwd** print the current directory on the remote server

```
sftp> pwd
Remote working directory: /home/demo
sftp>

```

## List files

**lls** list the files in the current directory on your _local_ system

```
sftp> lls
 Desktop lab py3-venv
 Documents mail R
 dotfiles myserverfile snap
 Downloads node_modules Videos
sftp>

```

**ls** list the files in the current directory on the remote server

```
sftp> ls
Desktop Documents Downloads Music
Pictures Videos
sftp>

```

## Download files

**get** download one file from remote server

```
sftp> get remote_file.pem
Fetching /home/demo/remote_file.pem to remote_file.pem
/home/demo 100% 1696 906.8KB/s 00:00
sftp>

```

**mget** download multiple files from remote server

```
sftp> mget *.csv
Fetching /home/demo/user1_accessKeys.csv to user1_accessKeys.csv
/home/demo 100% 96 73.1KB/s 00:00
Fetching /home/demo/user2_accessKeys.csv to user2_accessKeys.csv
/home/demo 100% 96 67.0KB/s 00:00
sftp>

```

## Upload files

**put** upload one file from local computer to the remote server

```
sftp> put local_file.pem
Uploading local_file.pem to /home/demo/local_file.pem
local_fil 100% 1696 75.2KB/s 00:00
sftp>

```

**mput** upload multiple files from local computer to the remote server

```
sftp> mput *.csv
Uploading user1_accessKeys.csv to /home/demo/user1_accessKeys.csv
user1_acce 100% 96 129.7KB/s 00:00
Uploading user2_accessKeys.csv to /home/demo/user2_accessKeys.csv
user2_acce 100% 96 132.1KB/s 00:00
sftp>

```

## Change directory

**lcd** change the current directory on your _local_ system

```
sftp> lpwd
Local working directory: /home/livia
sftp> lcd lab/
sftp> lpwd
Local working directory: /home/livia/lab
sftp>

```

**cd** change the current directory on the remote server

```
sftp> pwd
Remote working directory: /home/demo
sftp> cd Documents/
sftp> pwd
Remote working directory: /home/demo/Documents
sftp>

```

## Exit

**exit** exit the remote server sftp session

```
sftp>
sftp> exit
[user@computer1 ~]$

```

More about SFTP can be found at the [manual page](https://man.openbsd.org/sftp).