xdg-settings set default-web-browser firefox.desktop
sudo passwd <username> *username will not go into < >'s*
[sudo] password for <username>:
New password:
Retype new password:
passwd: password updated successfully
cp -a /path/to/source_dir/. /path/to/dest_dir/
# If you are in same directory
------------------------------
du -hs
# If you are in different location
----------------------------------
du -hs /path/to/directory
# If you want to list the size seperatyly for each sub directory
----------------------------------------------------------------
du -h | sort -h
# Go to directory and execute command
-------------------------------------
find . -empty -type d -delete
# Go to DIR and execute below command
--------------------------------------
find . -empty
--------------------------------------
>> It will list all the empty directories in the terminal
# If unzip command not found
----------------------------
sudo apt-get install unzip
# To unzip the zip file on the same location
--------------------------------------------
unzip FILE_NAME.zip
>> It means the source and destination folders are same
# To unzip a zip file to a target location
------------------------------------------
unzip file.zip -d /path/to/destination_folder
# If directory does not exist in the target location
------------------------------------------------------
cp -r /path/to/directory /path/to/folder
# Copy a directory with a new directory name
------------------------------------------------------
cp -r /path/to/directory /path/to/folder/NEW_DIR_NAME
# Delete a directory
------------------------------------------------
rm -rf DIRECTORY_NAME
# If show - Permission error
------------------------------------------------
sudo rm -rf FOLDER_NAME
# If not on the same level of the folder
------------------------------------------------
sudo rm -r /path/to/FOLDER_NAME
# Rename directory on current path
----------------------------------------------
mv old_dir_name new_dir_name
# Rename directory using directory path
----------------------------------------------
mv /var/etc/old_dir_name /var/etc/new_dir_name
# Second method - gvfs-move command
----------------------------------------------
gvfs-move /home/user/old_dir_name /home/user/new_dir_name
# create new directory(in current folder)
-----------------------------------------------
mkdir directory_name
-----------------------------------------------
# To verify it---
-----------------------------------------------
ls -l
-----------------------------------------------
# create directory on a path(another location)
-----------------------------------------------
mkdir /path/to/folder/directory_name
-----------------------------------------------
# create directory along with it parent directory
-----------------------------------------------
mkdir -p /home/new_parent_direcory/directory_name
-----------------------------------------------
>> If we use -p with mkdir it will create the parent direcotry also if it does not exist