Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 16 sty 2018 · You should use double quotes and need to evaluate date +"%F" using command substitution. $ touch "test_$(date +%F)" This will create an empty file test_2018-01-15. Double quote helps you create a single file where some options of date command would include a space.

  2. 7 gru 2012 · If you want to modify the file relative to its existing modification time instead, the following should do the trick: touch -d "$(date -R -r filename) - 2 hours" filename. If you want to modify a large number of files, you could use the following: find DIRECTORY -print | while read filename; do.

  3. 13 gru 2012 · Try the following command: find . -maxdepth 1 -xdev -type f -exec sed -i.bak '/teststring/Id' {} \; -exec touch -r {}.bak {} \; -exec rm {}.bak \; The find command executes three steps for each file found: sed changes the file and creates a backup of the original file (with a .bak extension)

  4. You can use the touch command along with the -r switch to apply another file's attributes to a file. NOTE: There is no such thing as creation date in Unix, there are only access, modify, and change. See this U&L Q&A titled: get age of given file for further details. $ touch -r goldenfile newfile. Example.

  5. 22 lis 2021 · The terminal program can change the modification and access time for any given file. The touch command creates a file only if the file doesn't already exist. This tutorial explains how to use the touch command with basic and advanced options.

  6. Changing file timestamps to a specific date and time. If you have a specific time and date you would like to be used for all the timestamps of a file or directory, touch command will gladly accempt a timestamp template with -t command line option.

  7. 2 wrz 2018 · With the touch command, you can change access, modify and change time of files and folders in Linux. You can update the timestamps or modify them to a date in the past. The syntax for touch command is quite simple: touch [option] file.

  1. Ludzie szukają również