Using touch command

Read More

touch Creates a file without content

touch file_name

For multiple files

touch File_name1 File2_name2 File_name3

Running touch on an already existing file: the file’s access and modification timestamps are updated to the current time, the content is not modified

touch -a To modify the access time only

touch -a file_name

touch -am Change access and modification time together

touch -am file_name

touch -c To check if file is created or not

touch -c file_name

-d option Use string with date instead of current time
touch -c -d "2020-03-09 11:33:12.000000000 +0100" file_name
-t option Use timestamp instead of current time. Format [[CC]YY]MMDDhhmm[.ss] touch -c -t 202003091133 file_name

touch -m This is used to change the modification time only
touch -m file_name

touch -r This command is used to copy only the timestamp onto another file

touch -r reference_file_name target_file_name

touch -h For modifying a symbolic link, not the pointed to

touch -h symbolic_link_file

Create several files touch

# Create files with names A to Z
$ touch {A..Z}
# Create files with names 1 to 20
$ touch {1..20}
# Create files with extension
$ touch {1..1000}.txt
# Create 10K files
$ touch {1..10}{1..1000}

Using touch to restore timestamps in a directory tree

To change all the directories to 755 (drwxr-xr-x):

find /opt/lampp/htdocs -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r–r–):

find /opt/lampp/htdocs -type f -exec chmod 644 {} \;

And to change file and directories timestamp

find . -exec touch {} \;

Only files

find . -type f -exec touch {} \;

Mount a deviceless webdav connection in Windows 10

Mount deviceless webdav
This type of connection cannot be persistent
net use http://domain/directory/ paasword /USER:user
Access
It is necessary to use MS \\server\resource notation
dir \\domain\directory
Mount with first unallocated unit letter
net use * http://domain/directory/ paasword /USER:user
Mount with specific drive
net use x: http://domain/directory/ paasword /USER:user
Unmount

net use http://domain/directory/ /delete
net use x: /delete

Caution:
net use * /delete
deletes all connections

Net Use Command Options
Option Explanation
net use Execute the net use command alone to show detailed information about currently mapped drives and devices.
devicename Use this option to specify the drive letter or printer port you want to map the network resource to. For a shared folder on the network, specify a drive letter from D: through Z:, and for a shared printer, LPT1: through LPT3:. Use * instead of specifying devicename to automatically assign the next available drive letter, starting with Z: and moving backward, for a mapped drive.
\\computername\sharename This specifies the name of the computer, computername, and the shared resource, sharename, like a shared folder or a shared printer connected to computername. If there are spaces anywhere here, be sure to put the entire path, slashes included, in quotes.
volume Use this option to specify the volume when connecting to a NetWare server.
password This is the password needed to access the shared resource on computername. You can choose to enter the password during the execution of the net use command by typing * instead of the actual password.
/user Use this net command option to specify a username to connect to the resource with. If you don’t use /user, net use will attempt to connect to the network share or printer with your current username.
domainname Specify a different domain than the one you’re on, assuming you’re on one, with this option. Skip domainname if you’re not on a domain or you want net use to use the one you’re already on.
username Use this option with /user to specify the username to use to connect to the shared resource.
dotteddomainname This option specifies the fully qualified domain name where username exists.
/home This net use command option maps the current user’s home directory to either the devicename drive letter or the next available drive letter with *.
/persistent:{yes | no} Use this option to control the persistence of connections created with the net use command. Choose yes to automatically restore created connections at the next login or choose no to limit the life of this connection to this session. You can shorten this switch to /p if you like.
/smartcard This switch tells the net use command to use the credentials present on the available smart card.
/savecred This option stores the password and user information for use next time you connect in this session or in all future sessions when used with /persistent:yes.
/delete This net use command is used to cancel a network connection. Use /delete with devicename to remove a specified connection or with * to remove all mapped drives and devices. This option can be shortened to /d.
/help Use this option, or the shortened /h, to display detailed help information for the net use command. Using this switch is the same as using the net help command with net use: net help use.
/? The standard help switch also works with the net use command but only displays the command syntax, not any detailed information about the command’s options.

Run Powershell script Windows 10

Read More

Create Script

Search for Windows PowerShell ISE and run the integrated editor.
Click on File menu.
Select the New option to create a new empty .ps1 file

Verify execution Policy

Run powershell as administrator.
Set-ExecutionPolicy RemoteSigned
On Windows 10, PowerShell includes four execution policies, including:

  • Restricted — Stops any script from running.
  • RemoteSigned — Runs scripts created on the device. However, scripts created on another computer won’t run unless they include a signature of a trusted publisher.
  • AllSigned — All the scripts will run as long as they’ve been signed by a trusted publisher.
  • Unrestricted — Runs any script without any restrictions.

Execute script

Execute command
& "C:\PATH\TO\SCRIPT\name_of_script.ps1"

Add Command Prompt As Administrator Context Menu in Windows 10

Read More

Create .reg file and execute with content:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedCmd] @="Open command prompt here as administrator"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedCmd\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenElevatedCmd] @="Open command prompt here as administrator"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenElevatedCmd\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenElevatedCmd] @="Open command prompt here as administrator"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenElevatedCmd\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenElevatedCmd] @="Open command prompt here as administrator"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenElevatedCmd\command] @=

User management in Ubuntu

Show last user logins into the system
lastlog | less
Currently logged in users in the system
who

Add new user
adduser username usergroupname (perl calling useradd)
useradd username

Delete user
userdel username
userdel -r username removing home directory

deluser with /etc/deluser.conf (Debian and derivatives)
deluser --remove-home

 

 

Windows 10 Add better sendto functionality

Read More

Adds multiple file send to functionality
Create SendToMailRecipient.vbs somewhere executable with the code below
Create a shortcut link to it
Put the link in the directory opened with shell:sendto

Option Explicit
Dim objArgs, OutApp, oNameSpace, oInbox, oEmailItem, olMailItem
Dim a, oAttachments, subjectStr, olFormatHTML
olMailItem = 0
olFormatHTML = 2
Set objArgs = WScript.Arguments 'gets paths of selected files
Set OutApp = CreateObject("Outlook.Application") 'opens Outlook
Set oEmailItem = OutApp.CreateItem(olMailItem) 'opens new email
For a = 0 to objArgs.Count - 1
Set oAttachments = oEmailItem.Attachments.Add(objArgs(a))
subjectStr = subjectStr & Right(objArgs(a),Len(objArgs(a))-(InStrRev(objArgs(a),"\"))) & ", " 'recreates the default Subject e.g. Emailing: file1.doc, file2.xls
Next
If subjectStr = "" then subjectStr = "No Subject "
oEmailItem.Subject = "Emailing: " & Left(subjectStr, (Len(subjectStr)-2))
oEmailItem.BodyFormat = olFormatHTML
oEmailItem.Display

Inverse selection in File Explorer

Read More

Use Invert Selection for Easier File Selection in Windows Explorer

The next time you need to select most of the files in an open Explorer window don’t waste your time holding down Ctrl and clicking each file manually. It’s much easier to select the ones you DON’T need, and then let Windows reverse your selection.

Inside an open window, hold down Ctrl as you select the file(s) you DON’T want to select (sounds backward, but wait…).

Select Edit, then Invert Selection, and Windows will turn your selection inside out leaving you with the files you wanted to select.

You can then delete or copy them as needed.

Excel tips

Read More

Freezing Rows and Columns

If you have a lengthy spreadsheet containing tons of data, you may have to scroll too far down or even across to view it all. This means you will lose sight of your headings and find yourself constantly scrolling back to see them. However, if you freeze the rows and columns, then those headers will remain as you move through your spreadsheet.

  1. Navigate to the View tab and select Freeze Panes on the ribbon.
  2. In the Freeze Panes dropdown, select Freeze Top Row, Freeze First Column, or choose both if needed.

tips to save time in microsoft excel

Now when you scroll up, down, right, or left, you will notice your headers will remain visible. To unfreeze those rows and columns, just select Freeze Panes command again and click Unfreeze Panes. How to Manage Columns in Excel How to Manage Columns in Excel Do you need to add, move, hide, or change columns in a complex spreadsheet? Don’t panic. We’ll show you basic Excel column operations to organize your data. Read More

Note that in older versions of Excel, the process is a bit different. Select the cell that is common to both the row and column you want to freeze and then click Freeze Panes.

Operating the Fill Handle

The fill handle in Excel can be a huge time-saver when you need to populate multiple cells and there are a few different ways this feature can be used. First, you can quickly create a list of numbers that count up by entering 1 into the first cell and 2 in the cell below it. Then, select both cells and when the fill handle appears, just drag to populate the cells as needed.

tips to save time in microsoft excel

When using the feature for dates, you can easily fill a column or row in increments of one day. For instance, you can enter 12/25/16 into the cell, select that cell, and when the fill handle appears just drag to add subsequent dates. This maneuver also works with days of the week and months of the year as well as downward through a column and across through a row.

tips to save time in microsoft excel
Another handy use for the fill handle is if you need to populate an entire column with the same value for your spreadsheet. If you enter a word or letter, for example, select the cell and double-click the fill handle. This will enter that value into the remaining cells of the column as far down as your spreadsheet has data. How To Save Time In Excel By Using The Fill Handle How To Save Time In Excel By Using The Fill Handle Read More

Transposing Columns and Rows

If you have a spreadsheet using headings in columns or rows (or both) and decide they would work better the opposite way, there is an easy process to make the change. This saves you from having to retype those headings. Here are the steps to move cells from row headings to column headings.

  1. Select the cells in the column that contain the headings.
  2. Either right-click and select Copy or click the Copy button on the Home tab of the ribbon.
  3. Select the cell in the row and column where you want the headings to start.
  4. Either right-click and select Paste Special or click Paste and then Paste Special on the Home tab of the ribbon.
  5. Select the checkbox near the bottom right that says Transpose.
  6. Click OK.

tips to save time in microsoft excel

Accessing the Calculator

While you may use an add-in that pops a calculator into the sidebar of your spreadsheet, you can also take advantage of the built-in calculator feature. This is convenient when you want to perform quick calculations that are not formulated into your spreadsheet. And you can add the calculator to either your ribbon or Quick Access toolbar. Doing Your Taxes? 5 Excel Formulas You Must Know Doing Your Taxes? 5 Excel Formulas You Must Know It’s two days before your taxes are due and you don’t want to pay another late filing fee. This is the time to leverage the power of Excel to get everything in order. Read More

To add the calculator to either location, begin by selecting File > Options. Then choose either Customize Ribbon or Quick Access Toolbar, depending on where you want it. In the Choose commands from dropdown box, pick All Commands. Scroll down, click Calculator, and then hit the Add button to insert it into the toolbar. Note that if you choose to add it to your ribbon, you will have to create a custom group and add it there.

tips to save time in microsoft excel

Linking to Tabs or Cells

If your workbook contains several spreadsheets with data being cross-referenced between them, creating a direct link provides speedy access. This is especially helpful if you are sharing a workbook so that others can jump to that data quickly. Follow these simple steps to create the link:

  1. Select the cell containing the data that you want to link.
  2. Either right-click and select Hyperlink or go to the Insert tab and click Hyperlink in the ribbon.
  3. In the popup window, select Place in this Document.
  4. Then enter the text to display in that cell, a specific cell reference if desired, and the spreadsheet in the workbook with the data you are linking to.
  5. Click OK.

tips to save time in microsoft excel

Using Keyboard Shortcuts

If you are an avid Excel user, then keyboard shortcuts can certainly save you time. While there are almost too many keyboard shortcuts to list, here are several that can speed up your tasks. 3 Essential Time-Saving Excel Shortcuts You Should Know 3 Essential Time-Saving Excel Shortcuts You Should Know Excel can be a headache for the uninitiated, but with these shortcuts in hand, you’ll save yourself a ton of time going forward! Read More

  • F4 (or Fn + F4) to repeat the last command, including formatting changes such as color or font.
  • Alt + H, E, A to erase the contents, formatting, and other data attached to the selected cells.
  • Ctrl + W to close a spreadsheet and Ctrl + O to open one.
  • Ctrl + Shift + Colon to enter the current time and Ctrl + Shift + Semicolon for the current date.
  • Shift + F9 to calculate the active worksheet.
  • Shift + Tab to move to the previous cell or option.
  • Ctrl + Home to move to the beginning of the spreadsheet.
  • Ctrl + Page Down to move to the next spreadsheet in a workbook and Ctrl + Page Up to move to the previous one.

Working With AutoSum

Some might think that working with formulas in Excel is too time-intensive to get into. But even for simple equations, these built-in functions can definitely move your spreadsheet work along faster.

Unless you have moved or deleted it from your ribbon, the AutoSum button should be on your Home tab. This handy feature gives you the most common formulas with a click. You can add, count, or average a group of numbers or obtain the minimum or maximum of them. Just click the arrow on the AutoSum button to choose your formula.

tips to save time in microsoft excel

In addition to the AutoSum feature, your Formulas tab contains even more options. Each formula is grouped into a category to make it easy to find. You can select from financial, logical, math, statistical, or engineering functions.

But for the most widely-used formulas, the AutoSum feature is quick and convenient.

Using Simple Conditional Formatting

Conditional formatting is another one of those Excel features that many might find intimidating. However, for data that you want to see pop off the page, it’s a great tool.

For example, say you have a spreadsheet of data from a survey and at a quick glance you want to see how many Yes answers you have as opposed to No answers. These steps show you how to apply simple formatting.

  1. Select the cells containing the Yes/No answers.
  2. On the Home tab, click the Conditional Formatting dropdown box.
  3. Choose Highlight Cells Rules and then Text That Contains.
  4. Type the word Yes in the left box and choose the formatting for it from the right box.
  5. Follow the same steps for the No answers.

tips to save time in microsoft excel

You will then see all of the Yes and No answers formatted the way you chose, making them easy to spot.

If you plan to continue to add data, you can also apply this conditional formatting to the entire column or row instead of just a group of cells. This way, future data will be automatically formatted as you enter it. Eager to learn more? Have a look at our dedicated article on conditional formatting. Automatically Format Data in Excel Spreadsheets With Conditional Formatting Automatically Format Data in Excel Spreadsheets With Conditional Formatting Excel’s conditional formatting feature lets you format individual cells in an Excel spreadsheet based on their value. We show you how to use this for various everyday tasks. Read More

Quickly Inserting Charts

The Charts feature within Excel is a terrific tool for displaying your data visually. And, you can choose from a variety of chart types such as pie, bar, line, column, and many others.

Using the above example of conditional formatting for Yes/No answers, you can insert a chart with just a few clicks.

  1. Select the cells containing the Yes/No answers.
  2. On the Insert tab, click Recommended Charts. With this option, Excel will take your data and put it into the type of chart it fits best.
  3. If you like the chart, click OK and it will be inserted into your spreadsheet.

tips to save time in microsoft excel

This is the easiest and fastest way to create a chart in Excel and takes only a minute. However, if you do not like the chart created for you, you can click the All Charts tab in the popup window and experiment with other types.

For further information on formatting your chart, learn all about creating a pie chart. How to Create a Pie Chart in Microsoft Excel How to Create a Pie Chart in Microsoft Excel Everyone can create a simple pie chart. But can you format it to perfection? We’ll take you through the process, one step at a time. Read More

 Sorting With Filters

When you have a spreadsheet containing many columns of data, you may want to sort or filter it all by a certain column. While there are a couple of ways you can do this, using a filter is the quickest and safest way to do it.

  1. Select the entire sheet by clicking the triangle button next to your first column at the top left.
  2. On the Home tab, click Sort & Filter.
  3. Choose Filter.

That’s it! This fast move will put an arrow into the first row for each of your columns. When you click an arrow, you can sort the entire sheet by that column in the way you choose. If it’s a date field, you can sort from oldest to newest and if it’s a text field, you can sort alphabetically.

In addition, you can filter the data to see only the entries you want. When you click an arrow you will notice checkboxes next to your entries. Marking and unmarking these boxes will filter the data so that you see exactly what you need.

tips to save time in microsoft excel

The nice thing about using the Filter feature is that it does not negatively affect the rest of your data. If you sort an entire sheet, Excel will adjust all columns. And if you filter, Excel will simply hide what you do not want to see.

Using the Format Painter

If you use other Microsoft Office applications such as Word, you may already be familiar with the Format Painter. In Excel, this convenient tool lets you apply the same formatting from one or more cells to others with a single click.

  1. Select the cell, group of cells, row, or column that you want to copy the formatting from.
  2. On the Home tab, click Format Painter.
  3. Select the cell, group of cells, row, or column that you want to copy the formatting to.

This is a fantastic way to quickly apply helpful formatting of cells to others without manual work.

 Switching and Viewing Windows

Are there times when you need to work with more than one Excel workbook at the same time? Maybe you need to review data, compare it, or even copy data from one workbook to another. Excel provides a useful set of viewing features to help. Head over to the View tab to check out these options.

  • Arrange All: When you click this button, you can arrange all of your open workbooks on one screen. Choose from a tiled, horizontal, vertical, or cascade view.
  • View Side by Side: This option lets you choose two open workbooks to view next to or on top of each other, which is perfect for comparisons.
  • Switch Windows: Click this button when you have many Excel workbooks open at once and want to switch between them quickly. No minimizing and maximizing windows is necessary with this awesome feature.

tips to save time in microsoft excel

 Installing Handy Add-Ins

Office Add-ins are similar to browser extensions in that they are tools to enhance your application experience, data, and efficiency. And in Excel, you have many helpful add-ins to choose from depending on your needs.

Select the Insert tab and click Store. You can then check out tools by category. For instance, the Productivity category contains add-ins for document automation and a template gallery. And, the Project Management category has add-ins for Gantt charts and activity timers.

tips to save time in microsoft excel

Some add-ins are free while others are paid, so be sure to check the details before installing one. And if you are looking for free Excel add-ins to help with visualizations, we have you covered.

 

Original article in https://www.makeuseof.com/tag/7-tips-save-time-microsoft-excel/

Windows 10 annoyances

Read More

1. You can not map a network drive with different users on the same remote server.
Microsoft says “it is by design”. Why?. There is no clear answer… but there are no technical barriers.

2. Control Panel has disappeared.
But there is no substitute for many functionalities.

3. Selecting default app for a file extension
You can not add easily a more detailed command.

4. Unstoppable automatic updates
Microsoft has decided: if you have Windows Home, your system will be updated whatever your circumstances, you might defer it for a while, but that is all.
Additionally, your system will auto reboot at some point in the next 24 hours.
They do not realise the task you might be doing could be much more important than any security threat.

5. Cortana
It does by default whatever a genius has decided in each update. At least, you can disable it completely.
Additionally, you have to send to MS your private life for it to work.

6. Edge
It is simply not compatible with a lot of web pages.

7. Select all context menu option
Select all, has disappeared almost everywhere. The button is hidden in Office as a customization.

8. Initial crapware

9. Take out apps or utils, instead of adding new ones
Modems, DVD, Fax, etc. are out of fashion, there is no need for MS to update the software, but take it out…?

10. Difficult to set a local account.
Microsoft is trying to make local accounts a thing of the past and push all new Windows 10 users to a Microsoft account.
To create a local account during setup, you may have to disconnect the computer from the Internet

11. Sign in with a local account instead of a Microsoft account
They are really trying to hide how to do it. Unfortunately, this is giving a clue that in a future update iteration, it is going to dissppear, creating big additional problems for the end user.

12. Not stopping telemetry completely.
You just have the possibility of sending a Basic set.
Update
Open the Task Scheduler. Modify the entry Microsoft/Windows/Application Experience/Microsoft Compatibility Appraiser to Disable.

13. Deciding how to see folders depending on content
Windows tries to be more intelligent than you on deciding how to see things on the file explorer

14. Right-button context menu functionality, changing on updates

15. More, more and more tasks running in the background.
No idea of what they are doing, they are possibly there for some reason, but MS and software companies are disconsiderate with resources.