Touching files?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Touching files?
# 1  
Old 07-13-2011
Touching files?

So, I think this is a really stupid question, but I'd like to see if I am right.

If the following commands are entered:

umask 000
touch file1
touch file2

...nothing should happen...right? The touch operation isn't going to apply any changes from umask to file1 (and same to file2)...I they should just have the default properties?

I'm guessing that file1 and file2 would both be rw-rw-rw...or is that wrong?
# 2  
Old 07-13-2011
The umask commands you gave will not affect the permissions.
But if you gave
umask 555

umask 333

etc, it will affect the permission of the files you touch
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Automate splitting of files , scp files as each split completes and combine files on target server

i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies

2. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies

3. Shell Programming and Scripting

remove commas if touching any letters

I have a csv file that I am trying to edit. I need to remove any comma that is touching a letter. I used this command to find them. grep , moz_places_good.csv | head -n 10 | grep ,I would think I could use some form of this to just delete the commas and not the letter before it. Just not sure... (5 Replies)
Discussion started by: cokedude
5 Replies

4. Shell Programming and Scripting

Sed/awk to delete single lines that aren't touching other lines

Hello, I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below). Example: one two three four five six seven eight I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies

5. Shell Programming and Scripting

rouch acts strange after touching around

hi there Strange title? Well is strange..."touch" is driving me nutts! Trying to set the access / modified date by a bash script. For a certain time everything works well with all files. After point x the code works only for some files, for others it doesn't. After looking for the ... (4 Replies)
Discussion started by: blah0
4 Replies

6. UNIX for Dummies Questions & Answers

Changing rights without touching user and group?

Hello, I have a small problem and would be happy if someone could help me to find a solution: A machine ("server") makes backups of different computers ("clients") using rsync. Users and groups are keept, so that it's possible to copy them back to the client if required. The number of groups... (3 Replies)
Discussion started by: tracer
3 Replies

7. Shell Programming and Scripting

How to retrieve all the linked script files/ctl files/sql files?

Hi I am going to migrate our datawarehouse system from HP Tru 64 Unix to the Red Hat Linux. Inside the box, it is running around 40 cron jobs; inside each cron job, it is calling other shell script files, and the shell script files may again call other shell script files or ctl files(for... (1 Reply)
Discussion started by: franksubramania
1 Replies

8. Programming

touching a file which contains slash char

i need to create a file which contains (/) character. Any help to do this (1 Reply)
Discussion started by: axes
1 Replies
Login or Register to Ask a Question