Listing absolute paths with `ls`

Normally when you list the files in your directory/sub-directory with the ls command you would get the paths to those files with respect to the current directory.

But what if you wanted to save this list and you wanted the absolute paths rather than the relative paths. Well it doesn’t strike you first but then when you know it, its like, “Oh its that obvious!”

So you do

ls -d $PWD/what_ever_you_are_trying_to_list

The $PWD gets filled with the path to the current directory.

Example:
ls work/*.md

might have yielded

work/this.md
work/that.md
work/something.md
work/someotherthing.md

But,
ls -d $PWD/work/*.md

would yield something like

/home/username/work/this.md
/home/username/work/that.md
/home/username/work/something.md
/home/username/work/someotherthing.md

Advertisements

Change Desktop Wallpaper – cmd – Gnome

To change the wall paper of your desktop with a custom image, from the cmd, type in the following

gsettings set org.gnome.desktop.background picture-uri file:///home/user/Pictures/Wallpapers/4462181-abstract-backgrounds.jpg

Yes. Replace the file path with your own file path.

For a detailed blog about changing wallpapers. Read this blog.